Libreoffice convert-to not working

前端 未结 10 571
孤城傲影
孤城傲影 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:32

    This is a known issue in LibreOffice that was fixed in version 5.3.0. Before this fix when an instance of LibreOffice is running --convert-to or any other command would silently terminate without doing anything.

    If your version is older than that you could consider the solution suggested by Frank Yin here. That is close all open LibreOffice documents before running the conversion.

    If you cannot close all open LibreOffice documents to run the conversion, or if you find it inconvenient, you could try a solution suggested in the comments to the original bug.

    If you have LibreOffice version before 4.5 run

    soffice -env:UserInstallation=file:///$HOME/.libreoffice-headless/ \
    --headless --convert-to pdf test.docx
    

    If you are running LibreOffice version between 4.5 and 5.3 run

    soffice -env:UserInstallation=file:///$HOME/.libreoffice-headless/ \
    --convert-to pdf test.docx
    

    Here $HOME/.libreoffice-headless is a new profile directory different from your main LibreOffice profile.

提交回复
热议问题