Lgo.png

 Going Linux

   for computer users who just want to use Linux to get things done


Add a PDF Printer

Updated: 06-May-2015

Way back in Episode 2 of the podcast, we mentioned that, "Linux provides the ability to create (print) PDF files directly from almost any application, but not from within Firefox! Open the same web page in Konqueror, for example, and -- no problem." That was true in 2007 when we recorded that episode. In today's Linux, you simply choose the "Print to File" option right there in the Print dialog box, and select the PDF option.

Print Dialog Box
Top

Printing from Modern Browsers

Most modern browsers use exactly the same print dialog box as any other application. A notable exception is the Chrome browser. It uses its own dialog box, and the selection Save as PDF is provided as an option.

Chrome Browser Print Dialog Box
Top

Printing with Ancient Distributions or "Classic" Browsers

The advice in the remainder of this document still applies if you are using an older version of your Linux distribution, or if you have a browser that behaves the way Firefox did "in the old days" of Linux. With this kind of application (we'll be nice and call them "classic" browsers) in order to be able to create PDF files from within any application that can print, there is an add-on package you will need to install. From within your package manager, search for and install the package "cups-pdf."

In Episode 8 of the podcast, listener Mike P. described printing from an old version of Firefox in an old version of KDE with the cups-pdf package installed.

Here is Mike's suggestion:

  1. When you have a page you want to print displayed in Firefox, select on File, Print. (or Ctrl+P)
  2. In the printer selection combo box, choose Postscript from the list of available or installed printers.
  3. Click the Properties button, then clear the command box and type in kprinter.
  4. Click on OK, then on Print and the print job will be passed on to the KDE printer where the option for PDF creation is there by default if you have cups-pdf installed.

Mike continues: From now on, whenever you choose Postscript from the Firefox printer dialogue, the kprinter option will be remembered. This will call up the kde printer dialogue and you can choose Print to PDF (file) or whatever else is available.

Top

Add the CUPS-PDF virtual printer in KDE (These are some original instructions for Kubuntu 6.10)

As an alternative, you can create a virtual printer that allows you to "print" PDF files. Here is how to add the printer to KDE once cups-pdf is installed. In 2006, (Linux Neophyte wrote an excellent post on how to add cups-pdf under Gnome 2.)

  1. From the K-menu select System Settings.
  2. Choose Printers.
  3. Click on Add and choose Add Printer/Class.
  4. Click Next, select Other printer type and click Next.
  5. Choose Virtual Printer [PDF Printer] from the list and click Next.
  6. Select Generic as the Manufacturer.
  7. Select Postscript Printer as the Model and click Next.
  8. Continue to click Next until you are prompted to give the printer a name, and name whatever you would like. I named mine "CUPS-PDF."
  9. Click Next then Finish and your new printer is ready for use.
  10. The PDF files you create with Ubuntu and Kubuntu will be located in the directory ~/PDF. (That's the PDF sub-directory in your home folder.)

CUPS Print Dialog Box
Top

Site Created with theMaker for Linux

Theme music for the Going Linux podcast is generously provided by Mark Blasco. http://www.podcastthemes.com
Creative Commons License Going Linux Podcast by Larry Bushey is licensed under a Creative Commons Attribution 4.0 International License.