Convert to pdf

From INIwiki
Jump to: navigation, search

Digg this!

To convert files to a .pdf I use LibreOffice

Follow this guide to install libreoffice on CentOS Libre office install

After the install use this command for headless opperation.

/usr/bin/libreoffice3.5 --headless --invisible --norestore -convert-to pdf:writer_pdf_export /path/to/file.rtf

This will conver the file named "file.rtf" to a pdf file with the same name and place it in the directory you executed the command from.

[edit] Example:

[root@localhost Desktop]# ls

[root@localhost Desktop]# /usr/bin/libreoffice3.5 --headless --invisible --norestore -convert-to pdf:writer_pdf_export ./testing.rft 
convert /home/chad/Desktop/testing.rft -> /home/chad/Desktop/testing.pdf using writer_pdf_export

[root@localhost Desktop]# ls
testing.pdf  testing.rft
Personal tools