How To Print to PDF in Ubuntu Intrepid Ibex and Jaunty Jackalope

Starting with Intrepid, the print to file option is integratedwhen you print.  However, with some programs, this causes garbled text after the first page, while other programs do not work with this option (check how to save documents from Scribd.com when disabled).

We can solve this problem with the good old cups-pdf tool.  We start by installing it with apt-get:

sudo apt-get install cups-pdf

install cups-pdf

change permissions
sudo chmod +s /usr/lib/cups/backend/cups-pdf

now when you goto system –> Administration -> printing
you should have a PDF printer. When you print, just select the PDF printer and by default the files are saved in a folder called PDF, so we will create this folder.

sudo mkdir ~/PDF/

mkdir ~/PDF/

You can change the default location by editing the .conf file :

sudo gedit /etc/cups/cups-pdf.conf

13 thoughts on “How To Print to PDF in Ubuntu Intrepid Ibex and Jaunty Jackalope”

  1. You shouldn’t make the directory PDF being root (with sudo) or cups won’t have privileges to write the files in it. Instead, you should just type.

    mkdir ~/PDF/

  2. OK, why in the world would intrepid and jaunty remove something like this. It was awsome option in previous dists. Made much more sense than the microsoft uncompatible format print to file option in windows.

    I don’t know why developers would even have the thought cross there minds on something so far away from anything having to do with improving Ubuntu. It’s like someone said “Hey I’m bored. I think I’ll remove the print to pdf option just for fun!”

    Thanks for the post. I would have just installed cups-pdf and been wondering why it doesn’t work had you not posted this line.
    sudo chmod +s /usr/lib/cups/backend/cups-pdf

  3. Hi, my problem is xp clients to a PDC via samba (with latest ubuntu server) I am not able to connect to any printer.
    It say something like: “group policies prevent connecting to this printer”.
    I have been trying to fix this for several days.

    can someone assist me how to solve this?

  4. Printing a Multimap page of text and images using this cups-pdf made the images and some text look blurred, despite increasing resolution to 600dpi.

    Printing to ps or pdf using the normal Firefox way gave much sharper images and text but the start of the lines were missing.

    Filesize of printout is much bigger with cups-pdf too.

    Any ideas how to make images look better with cups?

  5. Actually, scratch that. I fixed it.

    I didn’t like the idea of PDFs getting dumped in a directory in home when they’re clearly documents, so I’d changed the path to ${HOME}/Documents/PDF

    Apparently it did not like this.

  6. I have the Benji’s problem. The pdf printer works only with ~/PDF. When I change the folder the printer doesn’t create the output files. This is the log entry:
    Mon Sep 21 11:52:45 2009 [ERROR] failed to set file mode for PDF file (non fatal) (/home/stefan/documents/pdf/Ryanair.pdf)

  7. I did like the article really much, was really informative and the best part was that only the required part was elaborated, to the point concise information always helps and keeps readers running around digging for the information’s will never require a reread. I really wish spammers read these articles and check how easy it is to be human and respect knowledge.

Comments are closed.