I need to create a word file from a HTML content (on a ASP.NET server application) but couldn't find a robust way of doing that. So decided to run a discussion here to see what are possible options of doing this.
Aspose has a .NET component for this but the price is so high so can not be a solution (due to budgeting issues).
We expect this conversion to preserve tables, images, hiding invisible elements, links, etc.
There is a similar discussion here but solutions provided are all around Office Interop which is not a recommended solution for server application.
Any idea? Basically how do components like Aspose work?
Has the hard work already been done? There seems to be a project on codeplex.
Blog post describing HTML to docx converter
Project on codeplex
I would suggest writing code using the OpenXml API, you can navigate the DOM and programmatically add elements to the word document. Its no simple task through since you are interpretting markup and attempting to convert it.
link for Open XML: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5124
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With