Using Content Select to insert formatted text blocks

Home Forums Open-Xml-PowerTools Using Content Select to insert formatted text blocks

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3641
    Eric White
    Keymaster

    Hi Mark,

    This is a very interesting scenario. I didn’t specifically think of this scenario when I designed DocumentAssembler.

    One idea that I’ve had cooking for some time is to enable importing XHtml content. In this approach, you would convert your text to equivalent XHtml (or an approximation thereof), and DocumentAssembler would use the HtmlToWmlConverter module to convert to DOCX. Then, separately, I would enable the use of DocumentBuilder to import that new DOCX into the generated document.

    This isn’t a huge amount of work – a few days at most. However, this is not currently in my schedule. (I am doing some super-cool Open XML work currently, and will be blogging about it soon.)

    One approach you might take – when you see this content, insert some special tags in the document, and then post-process the document, making it as you like.

    I’ve put this on my list of projects.

    -Eric

    #3655
    Entropy
    Participant

    Hi Eric,

    Thanks for the update. That is very exciting news, would that mean that any docx could also be imported into the document?
    For the time being I am de-constructing the text block in SQL code into individual lines then re-building it in the document as a Repeat Select. It is not perfect but it works. Please let me know when you are likely to start work on this feature.

    Regards Mark

    #3674
    Eric White
    Keymaster

    Hi Mark,

    Yes, indeed, importing a document into another document is a simpler case of importing HTML, and this would also be a feature of the new DocumentAssembler.

    The great thing is that because this new code would rely on existing Open-Xml-PowerTools code, it would not be a huge effort to write. I designed the system with this idea in mind.

    As with all such efforts, creating XUnit tests, and productizing the code requires just as much (or more) time than actually writing the code.

    I hope to tackle this functionality in the next 2-3 months, but we’ll see how my schedule works out.

    Regards, Eric

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.