Question

Is there an easy way to convert HTML(with CSS styles and embedded images) to ODT, DOCX, DOC from the command line on linux server. I searched a lot but have not found a good option. There was a problem the same way to convert to PDF, decided by wkhtmltopdf. Perhaps there are ways to convert the resulting PDF documents to other formats?

Was it helpful?

Solution

To convert to odt it's pretty easy after installing pandoc.

After the relatively hard part: from odt (or even html) you can script (Open|Libre)Office via e.g. unoconv

Or you can like:

abiword --to=doc filename.odt

Also see this thread, and this blog post.

HTH

OTHER TIPS

I found soultion - is abiword in console variant.

If you want to convert HTML into docx you may use a solution like PHPDocX. You need to get the PRO version though because the free one does not include the conversion functionality.

If you're on ruby there is a gem based on libreoffice headless (with pyod/jod converter) and pdf tools

https://github.com/itkin/proselytism.git

Post with your issues to the pandoc GoogleGroup, John is very responsive in every way.

You may even find the latest release v1.9 may fix your problem, or maybe you just need to get to know the toolset in more detail.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top