Replace html content and save word template as pdf

Hi All,

I have some text in my form in rich text. I am getting string with HTML tags from the stored form. I tried it by following code:

builder.moveToMergeField("order_text");
HTMLRead html = new HTMLRead();
builder.write(html.convert(m_orderText));

No content was included in PDF document.

When I use builder.write(m_orderText); it prints html tags in PDF. Is there any other way to get it done?

Thanks
Vikas

Hi

Thanks for your inquiry. If you would like to insert HTML into your document, you should use insertHtml method. Please follow the link for more information:
https://reference.aspose.com/words/java/com.aspose.words/documentbuilder/#insertHtml-java.lang.String
Best regards,