I\'m trying to convert documents from html,txt to pdf,odt and vice versa.. But only odt to pdf seems to work.. No other file formats are converted
Here are my comman
For me. The problem I had was that --headless does not work, AT ALL (just returns in 15 milli-seconds), if a local libreoffice process already has the document open.
Make sure you only do headless operations on a document that is NOT already open in LibreOffice.
The following works
libreoffice --invisible -convert-to pdf myFile.html
libreoffice --invisible -convert-to docx myFile.odt
The option --invisible
does not start up the GUI but gives some clues on the command line what is happening.
Tested on Linux Mint 13.
This worked for me on LibreOffice 4.2 / Linux:
soffice --headless --convert-to txt:Text /path_to/document_to_convert.odt
Credit: http://ask.libreoffice.org/en/question/14130/how-do-i-install-filters-for-the-soffice-command/
Try closing all running instances of LibreOffice before executing the command. This was the root cause of my pain.