I was kind of annoyed to find out KDE4’s System Settings program didn’t include a Printers section, so this is what I did to add a new printer and setup printing anything to PDF.

Couldn’t be easier, as long as you know how to do it. Took me a little while to get it, but here is a step by step.

First, open a terminal window and switch to the root account; if you have sudo setup, you’re probably further along than most newer Fedora users (or you’re using Ubuntu). More on sudo another time …
su -

Next, install the “cups-pdf” package using yum.
yum -y install cups-pdf

Now that the package is installed, open your favorite web browser and open http://localhost:631. This is the CUPS administration page.

From here, click “Add Printer”. It’s the 3rd from the left in the 2nd set of icons.
In the next page, enter “Print to PDF” for the printer name, “Desktop” as the Location, and “Print to PDF file as the description. It actually doesn’t matter what you place in here, but it looks best when you go to File->Print from an application.

Advanced.

That’s it, unless you want to perform some customization. cups-pdf has the default settings to save the new PDF to the Desktop, which can clutter it up if you are print a lot of PDFs. To change the defaults, first open another terminal window if you’ve closed the original, and run the following commands:

Alternative to vi: open /etc/cups/cups-pdf.conf in a text editor, like gedit.
vi /etc/cups/cups-pdf.conf
:88 to go to line 88 (Ctrl+G in gedit to go to a particular line)
Remove the first # (uncomment the line)
Change the "Label 0" to "Label 1"

Now instead of saving the new PDF file to the name of the document, it will name it “jobXX_something.pdf”. I was printing individual pages from the same document and cups-pdf kept overwriting the same file, so this was useful for me.

vi /etc/cups/cups-pdf.conf
:46 to go to line 46 (Ctrl+G in gedit to go to a particular line)
Change the "Out ${DESKTOP}" to "Out ${DESKTOP}/pdf"

This will keep the new PDFs in a separate folder on your desktop, reducing clutter. Alternatively you can change this to your home directory by replacing “Out ${DESKTOP}” with “Out /home/${USER}” instead.

Save the file, and restart CUPS or log off/log on.

To restart CUPS, from a terminal window, type:
su -
service restart cups

That’s it. Helped me out tremendously when I figured this out.