Aspose Word not read the images and CSS of html

Hi Support,

Hope you are doing well.
Basically, We are using Aspose for .Net words and while creating the word doc file with the help of HTML. While injecting the HTML into the word template it’s not read the CSS and images of the HTML and it’s not working as per we expected. Please help us out in this situation.


That is the demo HTML we are injecting into the word file.


That is a word document that we are creating with the help of Aspose and use that HTML into this word but it’s not expected as we want.

@hassanali52 Could you please attach your input HTML document here for testing? We will check the issue and provide you more information.

@alexey.noskov Yes sure,

demohtml.zip (60.9 KB)

That is the HTML file I have used to inject into the word.

@hassanali52 Thank you for additional information. Unfortunately, HTML and MS Word formats are quite different it is difficult and sometimes impossible to guarantee 100% fidelity upon conversion from one to another. In Most cases Aspose.Words tries to mimic MS Word behavior when import and export in HTML format. You can learn more about features supported by Aspose.Words upon loading and saving in HTML format from our documentation:
https://docs.aspose.com/words/net/load-in-the-html-html-xhtml-mhtml-format/
https://docs.aspose.com/words/net/save-in-html-xhtml-mhtml-formats/

Here is MS Word output produced from your HTML: ms.docx (44.8 KB).