Saturday, August 1, 2009

Making PDF documents in Ubuntu 9.04 with CUPS-PDF

Yesterday , I wanted to send some web pages to a friend . I decided that I will make a PDF document and send the pdf. I looked around on internet for information about a pdf printer. Several sources pointed to cups-pdf.
I installed cups-pdf with,
$ sudo apt-get install cups-pdf
Under System->Administration ->printing a new entry came along with my HP 1007. See the screen shot below.

I tried to print my webpage. I got the following screen from firefox.

It seems cups-pdf is failing. I tried to print, but nothing turned out. I then looked at /etc/cups/cups-pdf.conf
Under path setting it is saying

### Key: Out
## CUPS-PDF output directory
## special qualifiers:
## ${HOME} will be expanded to the user's home directory
## ${USER} will be expanded to the user name
## in case it is an NFS export make sure it is exported without
## root_squash!
### Default: /var/spool/cups-pdf/${USER}


So, the pdfs are supposed to appear under PDF directory in my home folder.
I looked for PDF directory. It was not there. I created it manually and tried printing again.
The ubuntu 9.04 notifier said " Print job completed". I looked at PDF folder and the printout was there. :)

So, if you are trying to make PDF documents with cups-pdf don't forget to create an output directory (named PDF ) in your home folder.

See the screen shot below. It shows the screen when printing to a working pdf printer.


Nivir said...

Thanks it works fine

Anonymous said...

Since you say you were sending web pages, then with firefox 3 you could simply print to pdf directly from inside of firefox.

JB said...

In Firefox - why not select "Print to File" - then select ".pdf"

Anonymous said...

I know I didn't have to install anything special in Mandriva 2009 to print to pdf. I just used the "print to file" option and it gives me a choice of saving the page as PDF or PS format. Don't know if during my printer installation this was installed but it works.

Anonymous said...

Or you could just select "Print to file" from the printer selection window and choose PDF file format and the folder where you want to save it.

Anonymous said...

It is already there. Select the "Print to flie" at the top of the printer selection menu. (See the picture you have).

Anonymous said...

It's even easier than that.

Do you see where your printers are shown?
It says "Print to file", it's the first printer.

Select that, then select PDF (instead of PS), and choose where tp save the file to.

Ubuntu really is for human beings.

Joachim said...

What's the difference to "Print to file" when using file type PDF instead of PS? This works out of the box, and accordingly, I see no need to install a separate PDF printer.

Rupert said...

Wow! From everything I had ever heard the linux community was kind an considerate. I better look into my sources of information better.

At any rate this post was very helpful for someone who just wanted to figure it out :)