Easy PDF Creation in Ubuntu Linux.

Aug 10, 2007 by

When I was still a Windows user. I found it easy to create PDF documents through the use of software such as Adobe Distiller, Cute PDF Writer and so on…
After switching to Ubuntu, I was a little unsure how to do this until I installed OpenOffice which made PDF creation simple by using the file menu “Export as PDF” option. My problem was that I occasionally needed to do the same thing while using other applications.

Here is a simpler, effective solution. The “cups-pdf” (printing) can simply add that enhanced feature to your Ubuntu installation. To install it, type (in a terminal):

sudo apt-get install cups-pdf

You need to change file access using chmod.

The chmod command allows you to alter access rights to files and directories. All files and directories have security permissions that grant the user particular groups’ or all other users’ access. You will need to change the file permissions using this command:

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

Now all that remains is to set-up the CUPS PDF Printer by installing a new (PDF) printer:

Go to System –> Administration –> Printers –> New Printer
Select “Local Pinter”
Okay, use detected printer -  “PDF Printer”
Select the “Printer Driver”
Manufacturer – “Generic”
Model – “Postscript Colour Printer”
Name – “postscript-printer-PDF”
Now click “Apply”

You’re done!

To use the new PDF printer, select whatever the print function is for the application you’re using and then select that postscript-printer-PDF printer to create your PDF document. Unless specified, (I really don’t remember when I changed it), I’m sure I recall that there should be a /pdf directory where the PDF documents will be save to.

Changing the location where PDF documents are saved to, is a simple edit away…

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

Find “Out ${HOME}/PDF”

and change that entry to read as:

Out ${HOME}/whatever_directory_name_you_want_to_type_here

and simply restart the service to use the new settings (with that changed directory location) like this:

sudo /etc/init.d/cupsys restart

Voilà! – Easier to do than this post may make it seem!

Related Posts

Tags

Share This

2 Comments

  1. Dave Carter

    Does anyone know how I can get a newly created PDF file to be displayed by a PDF Reader immediately (and automatically) after being created by CUPS-PDF?

  2. bw

    Did anyone actually try it on Ubuntu 10.04?

    Try print a document from Open Office and see what you get. I always get a postscript file instead of a pdf, same with printing through Opera. I know, you can always change a ps file to pdf, but you shouldn’t have to.

Trackbacks/Pingbacks

  1. Print to PDF on Linux..? how..? - ABXZone Computer Forums - [...] Print to PDF on Linux..? how..? Like so, perhaps: Easy PDF Creation in Ubuntu Linux | ...

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>