Libreoffice convert-to not working

前端 未结 10 547
孤城傲影
孤城傲影 2020-12-09 17:13

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

相关标签:
10条回答
  • 2020-12-09 17:37

    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.

    0 讨论(0)
  • 2020-12-09 17:40

    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.

    0 讨论(0)
  • 2020-12-09 17:51

    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/

    0 讨论(0)
  • 2020-12-09 17:52

    Try closing all running instances of LibreOffice before executing the command. This was the root cause of my pain.

    0 讨论(0)
提交回复
热议问题