Friday, November 17, 2006

Create and Print to a virtual PDF printer 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.
Here is its set up of a few steps.

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.

Rename the printer
If you want a name better than "postscript-color-printer"
sudo pico /etc/cups/printers.conf
Change to
sudo /etc/init.d/cupsys restart

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.

0 Comments:

Post a Comment

<< Home