Printing to PDF with cups-pdf

Printing to PDF like to regular printer is very easy. To prepare such a printer we need to follow by few steps:

Install cups-pdf by using:
$ sudo apt-get install cups-pdf

Edit configuration file /etc/cups/cupsd.conf and set:

RunAsUser No

Restart cupsys:
$ sudo /etc/init.d/cupsys restart

Add a new printer. Click System->Administration->Printing. Choose “Add Printer”, then select “Generic CUPS-PDF Printer” and click “Forward”. Input name of your printer and click “Apply”.

Now you should have well configured and working new printer in your system. To test it open any text file and try to print it.
Newly created PDF files are stored in your $HOME/PDF folder.