Tuesday, December 8, 2009

Print to PDF using cups-pdf

I have been looking for a solution to print any file to pdf using a pdf printer driver.

cups-pdf is the package I was looking for apparently. But unfortunately, this takes just a little setting up.

Install cups-pdf by using:
$sudo apt-get install cups-pdf

Edit /etc/cups/cupsd.conf and change the line that says:
RunAsUser Yes
to
RunAsUser No

Restart cupsys:
$sudo /etc/init.d/cupsys restart

Add a new printer (System->Administration->Printing) selecting the “Local Printer” “PDF Printer” option. In the next step choose “Generic Printer” and then used the “Postscript Color Printer (Ver 3)” driver.

Now you should be able to print to pdf by selecting the newly setup printer.

Cribs:
1) The output .pdf files are stored in your “Home” directory. I can’t find a way to change this output directory to something of my liking
2) The output files are named with pre-defined names (job_8-untitled_document.pdf is an example). It would have been nice to select a name while printing.
3) One shouldn’t have to edit the cupsd.conf file to enable printing! (I found that I might have to edit the configuration file by visiting the homepage of the package, and trying out what I did). At the very least, the README.Debian file for the package should have informed me of the need to edit the configuration file.

Shortcut :
Ubuntu :
Go to menu System-->Administration-->Synaptic Package Manager. and type "cups-pdf" from quick search. if show it, please check and apply.
if success, please open printer manager, you can see "pdf printer" from printer manager

------------------------------ good luck ----------------------------------------------------

No comments:

Post a Comment