The LibreOffice logo.
In August of 20254, Both.org published an interesting article by regular contributor Don Watkins, “Bulk Document Conversion Made Easy with LibreOffice.” That article covered the use of LibreOffice to perform bulk conversions of documents from one format to another — at the command line.
I recently needed to convert the 57 chapters of the 3rd edition of my “Using and Administering Linux” book series. Those 57 ODT files needed to be converted to PDF files for my publisher, and I really didn’t want to do them one at a time using the GUI. For that I’d have needed to open each file individually, and then used the Save-As function to save them into PDF format.
So I referred to Don’s article which gave me the command I needed to perform that task. It was quite simple. The details are available in his article.
My command was simple.
time soffice --headless --convert-to pdf *.odt
The time command preceding the soffice command tells me how long it took in real time. I used the file glob *.odt to prevent document files with other extensions in that directory, such as docx, from also being converted.
OpenOffice completed the conversion in almost exactly 30 seconds. That certainly saved me a lot of time using the GUI interface.
Soffice stands for StarOffice, which was the original version of LibreOffice. That command has been retained to maintain backwards compatibility, even after the fork to LibreOffice.
real 0m30.058s
user 0m29.850s
sys 0m1.064s
Of course, the original ODT documents aren’t changed or deleted.
LibreOffice supports a number of formats for many document types.
| Document Type | Input Formats | Output Options |
| Word Processing | DOCX, DOC, ODT, RTF, TXT, HTML | PDF, DOCX, ODT, TXT, EPUB |
| Spreadsheets | XLSX, XLS, ODS, CSV | PDF, CSV, XLSX, ODS, HTML |
| Presentations | PPTX, PPT, ODP | PDF, PPTX, ODP, SWF |
| Drawings/Vector | VSD, VSDX, ODG, SVG | PDF, PNG, SVG |