In the previous article I’ve introduced you to OpenTBS which is a class able to create and edit OpenXML and OpenDocument documents in PHP, extremely useful for report generation. But what if you need to provide the documents in PDF for the final users?

In this article I’ll demonstrate how you can convert OpenXML or (preferably) OpenDocument reports to PDF using LibreOffice or OpenOffice. All this using PHP.