Hi,
I want to know is there any way to add javascript to the html document during conversion from doc to html using aspose api?
Thanks.
Hi Sonali,
Thanks for your inquiry. No, there is no way to add JavaScript or additional attributes to HTML using Aspose.Words. Aspose.Words does not deal with Javascript and no Javascript is read or written during open and save. If you are dealing with a page which part of is generated dynamically using Javascript then you still achieve the same results by first emulating the page in a browser and then importing the page source. This can be automated. Adding Javascript to an output HTML document can be done with some simple post-processing.
Best Regards,
Hi,
We are using aspose words for java. We found that documentBuilder.insertHtml() works for simple html components like title.We tried to add script using this method. But it is not included in final output html. Can you please explain how insertHtml works . How the inserted html is included in the html generated during word to html conversion.
Thanks.
Hi Sonali,
Thanks for your inquiry. No, you can’t add Javascript by using DocumentBuilder.InsertHtml method. This method takes simple HTML string as an argument to insert into the document. Please read the following API page for more information.
If we can help you with anything else, please feel free to ask.
Best Regards,