Using Libreoffice to Batch Convert Documents to PDF

Believe it or not, LibreOffice actually has a really handy tool built in to it for
converting files to a different file types (including .PDF, which is awesome).

The tool itself is in /usr/bin and it’s called lowriter.

The command to convert documents through Linux Terminal is

$ lowriter --convert-to "File Type" *."FileType"

We could do this for example:

$ lowriter --convert-to pdf *.doc

and that would convert any .doc files in a directory to .pdf.

To move them, you can do an -outdir at the end to put them in a different directory.

$ lowriter --convert-to pdf *.doc -outdir /directory/to/path

If you have only one or two documents you want converted it might just be easier to open them in Libreoffice and then “Save As” though. I’ve found this particular method works best for batch though and really is the easiest (and cheapest) way to convert documents to different formats.