Virtual PDF Printer
From Gentoo Linux Wiki
| Installation • Kernel & Hardware • Networks • Portage • Software • System • X Server • Gaming • Non-x86 • Emulators • Misc |
Contents |
[edit] Introduction
Using a virtual PDF printer, you can add PDF export capability to any program with printing capability.
[edit] Quick and Dirty Method
[edit] Installation
To get a no-frills virtual PDF printer working is quite simple. First install the net-print/cups-pdf package.
$ emerge cups-pdf
If you don't already have it, install net-print/gnome-cups-manager to make configuration brain-dead-simple (the GNOME way :-) (optional)
$ emerge gnome-cups-manager
Restart CUPS to for both of these packages to take effect:
$ sudo /etc/init.d/cupsd restart
[edit] Configuration
To get finalize the installation with the gnome cups manager:
- Go to Desktop --> Administration --> Printing. Enter your password when prompted.
- Double click "New Printer"
- Choose "Use a detected printer" and select "PDF Printer" from the list. Click 'Forward'
- Choose "Postscript" for the Manufacturer and "postscript color printer rev4" for the Model. The Default driver should be fine. Click 'Apply'
To get finalize the installation with the cups web interface:
- Start your favorite web browser
- Type into the address bar "http://localhost:631"
- Click on "Printers" and then on "Add Printer"
- Choose a nice name (e.g. cups_pdf_printer) and a description (e.g. Prints PDFs to /var/spool/cups-pdf/USERNAME/MyPrintJob.pdf) and click on continue
- Select "Virtual Printer (PDF Printer)" from the drop down menu and click on continue
- Select "Postscript" and click on continue
- Select "Generic postscript color printer" and click on continue to finalize the installation
You're done! Now you can print to the printer named "CUPS/postscript-color-printer-rev4" from any printing dialog. The output will be placed in /var/spool/cups-pdf/USERNAME/MyPrintJob.pdf
[edit] Tweaks
Here are some tips to make everything a bit more user-friendly.
[edit] Output to User's Desktop
To have the generated .pdf file placed on the user's Desktop:
$ echo 'Out ${HOME}/Desktop' | sudo tee -a /etc/cups/cups-pdf.conf
