Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenOffice command line PDF creation

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?

like image 780
Drejc Avatar asked Dec 10 '08 08:12

Drejc


People also ask

Does OpenOffice have a PDF editor?

An OpenOffice PDF editor allows you to import and modify PDF files.

How do I convert an ODT file to PDF in OpenOffice?

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.

How do I export a presentation to PDF in OpenOffice Impress?

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.


1 Answers

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.

like image 83
Eineki Avatar answered Nov 08 '22 08:11

Eineki