Free Support Forum -

HTML and CSS to Word document


we just purchased Aspose.Words version 13.2 (latest). We meet the exact same question. Do you have any update for this issue? We tested Aspose.Words with the html file from this thread and the generated pdf does NOT recognize the style sheet.

The inline style sheet works good, but we can't go this way since our html was predefine and it is difficult to modify.

Thanks in advance!


Please change the attached Input.txt to Input.html

You can see from the output.pdf, the 1st section css was not applied at all.

Please help.


Hi David,

Thank you for considering Aspose.Words.

Please note that it is not guaranteed that the output PDF document will look exactly the same as the input HTML. This is because Aspose.Words was originally designed to work with Microsoft Word documents and HTML documents are quite different.

Aspose.Words’ HTML engine tries to mimic the way the Microsoft Word works. To you, this means that if you convert HTML file into a Microsoft Word document or PDF using Aspose.Words, the output will appear almost exactly as if it was done by Microsoft Word. Moreover, I have attached two DOCX documents (one generated by Aspose.Words 13.2.0 and the other generated by Microsoft Word 2013) here for your reference. The first heading section appears to be the same in both output documents.

If we can help you with anything else, please feel free to ask.

Best regards,