Keeping HTML formatting

0
LCON posted this 19 March 2015

Hello,

I want to insert text in a word document while keeping its HTML formatting. For example, I want <b> Marie </b> to appear in bold letters in the resulting Word document. Is it possible ? How can I do that ?

Thanks

Last edited 19 March 2015

4 Posts
4 Points
2 Comments
Order By: Standard | Newest | Votes
1
jles posted this 19 March 2015

Hi,

Yes it is possible to insert HTML into a document. You must not use a FIELD element, which is a single value (text/number/date), but instead you must use a SUB DOCUMENT tagging element - HTML is in Docentric Toolkit treated as a (sub) document. All you have to do is place a SUB DOCUMENT element on to a template, set its format property to HTML (currently only HTML and Word sub documents are supported) and data bind it to a property that holds binary data representing a HTML fragment/document.

Note that support for HTML is currently limited to only basic inline styles. CSS styles are not supported and there is limited support for tables. We will add a much more rich support for HTML later this year.

Anyway if your HTML is limited to bold, italic, font and color, then the current HTML support will suffice. Is this the case with your scenario? Please let me understand what are your requirements.

If you haven't downloaded the trial version yet, I suggest you to do so. The product setup also installs the "Example Browser" application that you can use to run various examples while also changing the example templates. There is also one example showing how to insert an HTML fragment. You will be able to learn how the SUB DOCUMENT tagging element is utilized and see what source code is needed to achieve the results.

Thanks, Jure Leskovec

155 Posts
295 Points
0
LCON posted this 20 March 2015

Thanks a lot for you for your answer !

I think a sub document will suffice

Regards,

4 Posts
4 Points

Our 229041 members have posted 345 times in 102 discussions