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 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 Responses to “How To Print to PDF in Ubuntu Intrepid Ibex and Jaunty Jackalope”

  1. […] S­ee the o­ri­gi­na­l­ p­o­s­t: How T­o P­rin­t­ t­o P­DF in­ Ubun­t­u In­t­r… […]

  2. rmcantin says:

    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/

  3. […] In Ubuntu, we need to install cups-pdf to create a postscript printer. Check my previous post here f… […]

  4. ian says:

    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

  5. Mark says:

    Thank you for posting this article! I use the pdf printer a lot and was really missing it!

  6. Csaba says:

    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?

  7. Will says:

    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?

  8. saleh says:

    worked ;D
    nice and thanks

  9. Benji says:

    I’m not getting anything. The printer shows up just fine, and everything seems good, but no files 🙁

  10. Benji says:

    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.

  11. Stefan says:

    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)

  12. […] To Print to PDF in Ubuntu Intrepid Ibex and Jaunty Jackalope MOVED TO :… Possibly related posts: (automatically […]

  13. Jamaal Turli says:

    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.