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.

-- Select SYSTEM > ADMINISTRATION > PRINTERS > NEW PRINTER
-- Select LOCAL 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

Out ${HOME}/PDF

and change to something like below

Out ${HOME}/my_print_to_pdf_folder

and restart

sudo /etc/init.d/cupsys restart

Sponsored Link

Incoming search terms:

Related posts

22 thoughts on “How to Create PDF Documents in Ubuntu

  1. 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

    [Reply]

  2. 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. =/

    [Reply]

  3. 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!)

    [Reply]

  4. 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”

    [Reply]

  5. 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
    /var/spool/cups-pdf/ANONYMOUS

    [Reply]

  6. 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

    [Reply]

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

    [Reply]

  8. 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

    [Reply]

  9. 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.

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

    [Reply]

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

    [Reply]

Leave a comment

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