Creating PDF on Linux
Here’s a quick heads-up on how to create PDF printouts on Linux, in case you’re as unaware of how to do that as I was.
Some applications have built-in PDF capabilities, for example OpenOffice.org does, but others like Firefox or Thunderbird don’t. Recently I needed to create a PDF printout from a Wiki page, to send it to people who didn’t have access to an internal Wiki I’m using. On Windows, I would have installed a software like PDF Creator which installs a system printer that creates PDF files from any application. When I looked around for something comparable for Linux I wondered why it seemed hard to find anything. Eventually, I ended up installing the printpdf extension, which does exactly what its name implies.
I’ve uninstalled that extension, forever, when I found out that Linux has a PDF system printer already. At least, that’s the case if you’re using CUPS (Common Unix Printing System), which is the de facto standard on Linux. (Disclaimer: I’m using openSuse Linux 11.1, so I can’t tell for sure if the PDF capability is built in on other flavors of Linux, too.)
Using it is simple. In any application, just select „Print“. In the dialog that pops up, select „Print to file“, and select the „PDF“ radio button. Under Firefox, the dialog suggests to create a PDF file named „mozilla.pdf“ in the the „Documents“ folder of your home directory.
In other applications such as the kate editor, the dialog looks different. Here, you can simply select a system printer named „Print to File (PDF)“, which suggests to create the PDF file in your home directory, and name it „print.pdf“.
The difference between those print dialogs: The one described first is the Gnome print front-end, which my system uses for applications that were written for the Gnome window manager (like Firefox, Thunderbird, or Gimp). The latter dialog appears for KDE applications. The KDE dialog is a bit more straightforward I think – it’s not perfectly obvious that you’d have to select „Print to file“ to create a PDF printout. The Gnome front-end with its tabs looks more modern, though. I believe Linux should aim for unifying things like these, because using different dialogs for the same functionality has the potential to confuse users.