LibreOffice / OpenOffice

From Torben's Wiki

OpenOffice Calc

see here

batch convert docs to pdf

lowriter --invisible --headless  --convert-to pdf:writer_pdf_Export *.odt
# (Windows: "--" -> "-")

Does only work if LibreOffice / OpenOffice is not running. Can be checkt in a bash script like:

if [ "$(pidof soffice.bin)" ] ; then
  read -p " ==> close all LO windows to allow for automatic PDF generation <=="
fi


Depreciated: jodconverter

The tool jodconverter allows filetype convertion from the terminal or a script ;-)

# start OOo and set it to listen on port 8100
soffice -headless -accept="socket,port=8100;urp;"
# convert a presentation to pdf
jodconverter file.odp file.pdf