In a release long, long ago and in a galaxy far, far away I blogged about how to configure Ubuntu to print directly to a .pdf file.  Looking back to this article it appears to be outdated an in need of some corrections.  This tutorial will outline how to use and, if needed, configure your Ubuntu 8.04 machine to print directly to a .pdf file.

Verifying Setup or Print to PDF Configuration

My Ubuntu 8.04 installation was already configured, out of the box, to print to .pdf.  This means, without any additional configuration I could select “Print” from an application and the output would be generated into a .pdf file and saved to disk.  You can verify whether or not your machine is configured the same way by Navigating to:

System > Administration > Printing

system-config-printer

If you already see a Local Printer listed as “PDF” then your machine is already configured as well.  If, for whatever reason, this is not the case for you this can be configured as follows.

  1. Install the cups-pdf package using: sudo aptitude install cups-pdf
  2. Select “New Printer”
  3. Select “Print into PDF file” with the device URI of “cups-pdf:/”
  4. Select “Generic”
  5. Select “PDF file generator”
  6. Assign a name.  “PDF” should be sufficient.
  7. Select “Apply”

pdf printer

Again, I would be surprised if this is not configured on your machine by default, but I never can tell what some of you have done to your machines ;)

Printing Directly to PDF

Once you have verified your machine is configured properly you should now be able to print documents directly to a .pdf file.  This should include text documents, web pages, etc.  Simply select “PDF” as the printer when you want to print a document.

After a print job has been sent you can find the generated .pdf file in your users Home folder within a new directory called “PDF”.

print to pdf resulting file

I post tutorials very regularly on this site. You may want to consider subscribing to the RSS feed. Or if you'd prefer these tips sent to your inbox you can use Email Subscriptions.

Related Posts

Random Posts

-->

Comments

11 Responses to “Print Directly To PDF in Ubuntu 8.04”

  1. Fer on July 3rd, 2008 9:20 am

    Thank you.
    I knew about this tip. Just wondering if anyone found a way to choose a “name-file” for the PDF to be print. It is very annoying -have to- remember to rename each PDF after printing. I have to just to avoid overwriting it with the same name if printing something else from the same place later.

  2. Michael on July 3rd, 2008 11:05 am

    Unfortunately it does not work for me.
    No file is created.
    I see two PDF directories in my system:
    one in my homedir
    one in /root
    Both have no output files

    I guess you have to be very lucky if this gonna work the first time.

    I use Oo to produce PDF files, but this seems to me more convenient. If it works of course :-(

  3. Michael on July 3rd, 2008 11:11 am

    Addendum:
    After choose refresh in the printer configuration and make a testpage again, the PDF is created in the /root/PDF folder!
    Unfortunately this folder it is only accessible as root user :-(… But there is at least something… :-)

  4. miles on July 3rd, 2008 11:41 am

    With the new Evince in Fedora 9 the save to file is broken (it saves as a blank file) and printing the pdf is the only way to save the pdf. Not sure if this is an Evince problem or Fedora. Is Evince working correctly in Hardy?

  5. Tom on July 3rd, 2008 12:46 pm

    Is there a possibility to change the output folder? I would prefer another location then ~/PDF/. Thanks.

  6. Christer Edwards on July 3rd, 2008 2:25 pm

    @Tom - take a look at the /etc/cups/cups-pdf.conf and update the “Out” line. Currently it points to $HOME/PDF, but you should be able to change this to whatever location you have access to.

  7. Tom on July 3rd, 2008 2:34 pm

    @Christer Edwards: Thanks for the tip :-)

  8. mlissner on July 3rd, 2008 6:47 pm

    I have had this set up for a while now, but I want to be able to save the file to a location when I do this. Has anybody figured out how to do that yet? It’s got to be the most common request from this…

  9. Fer on July 4th, 2008 12:37 am

    For those who want to be able to chose file-name or destination folder for the PDF. In Hardy is possible to print to file and chose PDF instead the usual Postscript, also is possible to chose the folder destination and the file-name.

  10. Michael on July 4th, 2008 4:34 am

    @Fer: Great thanks :-)

  11. Edy on July 30th, 2008 11:28 pm

    PDF output in Hardy is a mess compared to PDF output in other OSes! For some reason, some pages are not printed when I print from Firefox.

    This is why I cannot completely switch to Ubuntu. Too many broken things …

    Anyone knows how to fix this?

Leave a Reply




    OSCON


    OSCON 2008

    Subscribe to the RSS feed!


    subscribe to the ubuntu tutorials RSS feed

    Polls


  • Regarding the Ads on Ubuntu Tutorials...

    • I dislike all web-based ads and use AdBlock (or similar) to destroy them! (49%, 155 Votes)
    • I don't mind the text-based ads on ubuntu-tutorials.com and currently view them. (31%, 99 Votes)
    • I would be willing to disable AdBlock (or similar) for this site considering I have found it helpful. (16%, 51 Votes)
    • I subscribe to ubuntu-tutorials.com via RSS or email so ads are a non-issue. (15%, 48 Votes)
    • I'd be willing to use the "Donate" button instead of see ads. (5%, 17 Votes)

    Total Voters: 316

    Loading ... Loading ...

  • Blogroll

  • Ads by Google