Aspose.Words for Java : InsertHtml

Hi,

I am using Aspose.Words for Java. This is regarding the insertHtml function in DocumentBuilder. Is there a way to specify a html file using the insertHtml function. Writing each html statement using the builder.insertHtml() is quite cumbersome.

Appreciate your response.

Regards
Sindhu

Hi, Sindhu,
No, DocumentBuilder.insertHtml() method accepts only Strings.
As workaround you can use new Document(“SomeHtmlFile.html”) to load in an arbitrary html file. Or you can load the file to a one big string and pass this string to DocumentBuilder.insertHtml() mthod.
Regards,