I am trying to convert a html to doc or docx. I used some of the available php classes but the results are not good. I wonder if I can convert a html file to doc using some office software like LibreOffice or OpenOffice?
LibreOffice (AbiWord) "converts" html to a doc file but without formatting. I mean I see the html sourcecode when I open the doc file.
abiword --plugin AbiCommand
convert /home/qqq/test/test.htm /home/qqq/test/test.doc doc
And with openOffice, nothing happens..:
soffice --headless --convert-to doc:DOC /home/qqq/test/test.htm
I have to press ctrl+c to get back to the console.
Any Ideas how to convert html to doc? I can open the html in the desktop version of these two apps and save as doc but it seems not to work in the console version.
pandoc
does this quite well, but you specifically limited your question to OO / LO so I'm not putting this an an answer...pandoc -s -r html page.html -o output.docx
... It's a very complex program and you have to get used tto it though.