CUPS

If you want to print files to pdf format directly, install cups-pdf which installs a new PDF printer.

sudo apt-get install cups-pdf

By default, printed PDFs are stored in ~/PDF, but this can be configured in /etc/cups/cups-pdf.conf