OpenOffice command line PDF creation

后端 未结 5 2120
耶瑟儿~
耶瑟儿~ 2020-12-14 03:26

I have some documentation written in OpenOffice, and I would like to include some of it as PDF files in the final build deliveries. I would like to do this with the automate

5条回答
  •  感动是毒
    2020-12-14 03:40

    Though this question is a little old, here something for the purpose of documenting some common pitfalls with the LibreOffice solution:

    • If lowriter does not work for you because it ignores command line parameters and brings up the gui just try calling the libreoffice or loffice binaries:

      loffice --headless --convert-to pdf yourfile.odt

    • If you get this message

      Error: Please reverify input parameters...

      try running it as root (e.g. via sudo). This helped me on Ubuntu 12.04 LTS with LibreOffice 3 installed and may also be a reason why this conversion is not running on a webserver without proper configuration (Libreoffice --headless refuses to convert unless root, won't work from PHP script)

    • Also make sure that you do not have any other instances of LibreOffice running or it will just fail silently and do no conversion at all.

提交回复
热议问题