How to Create PDF Documents in Ubuntu

Sponsored Link
If you are using OpenOffice it is very easy to create documents there is an option in the File menu ‘Export as PDF'.For other applications, you will need to do the following procedure

We need to install cups-pdf this software is designed to produce PDF files in a heterogeneous network by providing a PDF printer on the central fileserver. It is available under the GPL and is packaged for many different distributions or can be built directly out of the source files.

Install cups-pdf

sudo apt-get install cups-pdf

You need to chnage the following file permissions

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

Configure CUPS for the PDF printer.

-- Use detected printer: PDF PRINTER
-- Select Print Driver:
-- Manufacturer: Generic
-- Model: Postscript Color Printer
-- Name: postscript-color-printer-rev3b
-- Click APPLY

When printing from any application, select the newly created postscript-color-printer-rev3b printer to generate PDF files.

Output files are stored in your home directory under /PDF subirectory.

To change the default location of the PDF output

Edit the /etc/cups/cups-pdf.conf file

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

look for


and change to something like below

Out ${HOME}/my_print_to_pdf_folder

and restart

sudo /etc/init.d/cupsys restart

Sponsored Link

You may also like...

22 Responses

  1. Bernardo says:

    Thanks a lot bro, works like a charm!

  2. Abhishek says:

    Installed perfectly, but have a problem in printing Pages from Firefox. It prints pages frame by frame not exactly how it’s layout.

    Before Installing the printer, the Print Preview was generating pages as displayed, but not now. How can I avoid this

  3. Sean says:

    Anyone got directions on how to do this under KDE? I’ve installed CUPS-PDF package, but it isn’t allowing me to install a local printer. =/

  4. dechef says:

    Man , this is magic ? works perfect my sons and daughters ::who needs windows ? LOL

  5. Herati says:

    Flawless. Thanks!

  6. Beben says:

    Nice….it is very wonderfull, and right now I don’t need windows again…:)

  7. Ken says:

    For some reason I can only get ps output from this? Obviously I’m doing something dumb (and I can always use ps2pdf to convert, just want to know what I might be missing!)

  8. steven says:

    Excellent! works great. Thank for the tips.

  9. Levani says:

    how can I apply this instruction for Ubuntu 8.10?

  10. admin says:


    Same procedure should work for ubuntu 8.10

  11. V says:

    It doesn’t work 😐

  12. V says:

    I was able to make it work with the following instructions: “Right after installing cups-pdf on intrepid, it’s not possible to print a document in PDF unless you create the /home/user/PDF folder, or if you launch sudo aa-complain cupsd”

  13. Lex says:

    Hi, your post is little bit misleading. You realy don’t have to mess with cups backend rights.
    Simple way how to enable pdf printer in Ubuntu 8.10 is:

    #install cups-pdf
    sudo apt-get install cups-pdf

    # change target dir in cups-pdf.conf (line begins with Out …)
    # !!! ANYONE must be able to write to target dir, so cups-pdf, can print there !!!
    sudo nano /etc/cups/cups-pdf.conf
    # anyone can read and delete printed PDFs!
    Out /var/spool/cups-pdf/ANONYMOUS

    # restart cups (don’t know if this is necessary)
    sudo /etc/init.d/cups restart

    # your printed PDFs will be in folder

  14. Jonathan says:

    Actually, all I had to do was install cups-pdf (sudo apt-get install cups-pdf) and then create a folder called PDF in the home directory. I then gave that folder write permission to Owner, Group, and Others.
    Without creating that folder, printing would fail.
    I am not sure if I needed to give those permissions to it. I only did so because of this comment from Lex (above): “ANYONE must be able to write to target dir, so cups-pdf, can print there !!!”

    This was all on Ubuntu 8.10

  15. fr@nk says:

    On Xubuntu 9.04 i386 is too only required to create “PDF” folder in home directory.

  16. dark bunny says:

    Ja, thanx Jonathan. Im newly converted to Linux. But even the latest Ubuntu version makes you THINK! Anyway it’s the best distro Ive used so far

  17. cporter says:

    For those that would like to customize cups-pdf you could go to this link:

    also try to modify the post-script

  18. reese says:

    should it not be sudo chmod +x /usr/…..

  19. fda says:

    Decent way (in Jaunty) is to correct your folder permission:
    $ chmod -v go+x PDF
    (^might be also needed to your user’s home folder)

    This way you will avoid security risks mentioned in:

  20. semidark says:

    Nice hint,

    under Lucid Lynx I just had to install the cups-pdf package and create the PDF folder.

    Messing around with the Permissions was not required. In fact it renders the PDF printer useless.

    Unable to execute /usr/lib/cups/backend/cups-pdf: insecure file permissions

  21. Morick says:

    Is there anyway to make the PDFs searchable using cups-pdf? I can’t even copy any of the text within the pdf file.

  22. nasir gilgit baltistan says:

    how to convert word to pdf?

Leave a Reply

Your email address will not be published. Required fields are marked *