Free Support Forum -

HTML Formatted Data with Images


I am trying to evaluate if we can use ASPOSE Word in our application.

I will get HTML formatted data from the database. This data can contain a few images. These images can appear anywhere in the data. But there are only fixed number of images.

I want to know if I can do the following in ASPOSE application

1) Can we convert this HTML formatted data into Word with formatting.

2) Can your component convert the images in HTML to images in word? Please note that these images can appear anywhere in the data.




Thanks for considering Aspose.Word.

Yes, everything that you have decribed is possible with the use of Aspose.Word.

I suggest you download the evaluation package and install it. The package contains several demo projects which will help you to get started. Also check our Wiki articles on

And you can always count on getting qualified help from our technical support team here on the forums.

Best Regards,


Thanks for the quick response. I looked at the demos but none of them show how we can create word documents with data that is in HTML format. Can you please point me to an example or code snippet?

And also which of the following 2 methods is efficient. If I have HTML formatted data in the database and I want to convert that into a doc file.

1) Create a temporary HTML file and then use your component to Convert that HTML file to Word.


2) Directly convert to word by getting the data from the database.



The best way of doing what you want is to load html from database into the Stream object and then use one of the Document class overloaded constructors, defined in Aspose.Word API Reference. In you case it seems that Document(stream, baseUri) constructor is most suitable for the task.

Then save the resulting document in doc format, using Document.Save.