Friday, 21 September 2012

Print and save PDF files in Linux

Creating PDF in Linux is quite easy. Here i am illustrating it for Ubuntu 10.04

First we need to install cups-pdf package using agt-get

sudo apt-get install cups-pdf

It will be downloaded and installed at path /usr/lib/cups/backend/cups-pdf.
A new entry 'PDF' will also be added to printers list.

Now add current user on Execution

sudo chmod +s /usr/lib/cups/backend/cups-pdf

Now we need to create a new folder 'PDF' inside home folder

sudo mkdir ~/PDF/

Reason behind this is, when you print using this PDF printer, by default the files will be saved to PDF folder under your home folder. That's why we created above. However you can change it (see below)

If you want to change that default save folder then you can do this by editing the config file :

sudo nano /etc/cups/cups-pdf.conf

Find there line with text 'Out ${HOME}/PDF' (do not include quotes)

Replace it with your desired path, like

Out ${HOME}/Documents

Now all done. Enjoy print to PDF in Linux!

No comments:

Post a Comment