How to convert documents to PDF in PHP?

How to convert documents to PDF in PHP?

< 1 Minute Read

‘Unoconv’ is the tool to convert doc, docx, odt to PDF file in PHP.


‘Unoconv’ is a command line utility that can convert files from any ‘OpenOffice’ supported formats to a different ‘OpenOffice’ supporting format.


Installation Required:

  • OpenOffice and Unoconv

You can provide one or more files as arguments to convert each of them to the specified output format.


unoconv -f pdf  example.doc

bove command will convert the example.doc to example.pdf in the current working directory.

Some other commands are:

unoconv -f odt example.doc
unoconv -f doc example.odt
unoconv -f jpg example.odt
unoconv -f xsl example.csv
No Comments

Post A Comment

Exit pop up

Before You Go...!

Subscribe to Andolasoft Blog

Stay up to date with the latest techniques of web & mobile app development service tips and our SaaS and open source product news.
Holler Box