To install PDF printer in Ubuntu, using cups-pdf: Start a Terminal and enter the command:
$sudo apt-get install cups-pdf
Then add your new printer for PDF:
In Ubuntu menu, Click System -> Administration -> Printing
Click the Add button.
Select Generic CUPS-PEF, click Forward
It will start a search Dialog.
Select Generic and click Forward.
Simple accept the recommended setting: CUPS-PDF/Generic CUPS-PDF Printer[en]
Click Apply
Finally, you can test it.
The output files will be saved in PDF folder under your HOME.