PDF document conversion in CentOS 7 using unoconv and Libreoffice

yum install libreoffice-headless unoconv

If unoconv is not found by yum, direct download from rpmfind.net and install it :

rpm -ivh unoconv*

If unoconv requires libreoffice-writer / calc /etc, do this first :

yum install libreoffice

Finally, restart the server :

reboot

This is an example to convert DOC file to PDF :

unoconv -f pdf sample.doc

To set verbosity use the -v switch :

unoconv -vvv -f pdf sample.doc

In CentOS 6.6, i have to start the listener to start conversion, but in CentOS 7, apparently i don’t have to start the listener to do conversion.

So in my case, i do not start the listener, but if u have to :
unoconv –listener &

Alternatively you can use libreoffice to do the conversion for you from the shell :

libreoffice –headless –invisible –convert-to pdf sample.doc

Advertisements

One thought on “PDF document conversion in CentOS 7 using unoconv and Libreoffice

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s