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 automated build script.
Is there a way to create a PDF file from OpenOffice with a command line command?
An OpenOffice PDF editor allows you to import and modify PDF files.
Simply convert an ODT file into a PDF with one click. To do this, select the “Export directly as PDF” button in the toolbar. A window will open automatically where you can specify the file name and location. OpenOffice Writer lets you export a PDF in a single click.
For more control over the content and quality of the resulting PDF, use File > Export as PDF. The PDF Options dialog opens. This dialog has five pages, described in this section. Make your selections, and then click Export.
As of September 2012, LibreOffice can convert a document to PDF from the command line:
lowriter --headless --convert-to pdf yourfile.odt
It also has bulk conversion support:
lowriter --headless --convert-to pdf yourfiles*.odt
will convert all the files that match the pattern to the corresponding PDF file.
There must be no LibreOffice windows open when you run this command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With