Best way to export html to Word without having MS Word installed?

There's a tool called JODConverter which hooks into open office to expose it's file format converters, there's versions available as a webapp (sits in tomcat) which you post to and a command line tool. I've been firing html at it and converting to .doc and pdf succesfully it's in a fairly big project, haven't gone live yet but I think I'm going to be using it. http://sourceforge.net/projects/jodconverter/


While it is possible to make a ".doc" Microsoft Word file, it would probably be easier and more portable to make a ".rtf" file.


There is an open source project called HTMLtoWord that that allows users to insert fragments of well-formed HTML (XHTML) into a Word document as formatted text.

HTMLtoWord documentation


If you have only simple HTML pages as you said, it can be opened with Word.

Otherwise, there are some libraries which can do this, but I don't have experience with them.

My last idea is that if you are using ASP.NET, try to add application/msword to the header and you can save it as a Word document (it won't be a real Word doc, only an HTML renamed to doc to be able to open).

Tags:

Html

Ms Word