Posted by gna on Fri 22 Apr 2005 at 08:38
There are many solutions for printing PDF documents which cost money, and which not. But with all these solutions, you can do this on your own computer. But what to do if one needs this in a centralized way?
If your users have a samba server, you only need GhostScript and CUPS, and a little engine named cups-pdf.
The GS, and CUPS packages and their dependecies exist in stable, the cups-pdf engine only beginning with testing, or unstable distributions.
If you're running stable you don't need to mix, instead you could compile it from source.
Once you installed the mentioned packages, and have a working samba (which defaults to CUPS as print-processor), you only need to have a complier, and get the cups-pdf source from here.
Extract the source, and edit the src/cups-pdf.h.Be sure to have the directory for the spool ready (default is /var/spool/cups-pdf), and change the output directory (CPOUT) to "$HOME". Maybe you will also wish to change the CPHOMESUB setting also, but it is not necessary.
After that you can compile cups-pdf with:
gcc -O9 -o /usr/lib/cups/backend/cups-pdf cups-pdf.c
This puts the cups-pdf backend in the right place.
Then you should copy and gunzip the extra/PostscriptColor.ppd.gz to the file /usr/share/cups/model/PostscriptColor.ppd
Finally you need to restart cups
Add a printer (maybe with the admin interface on http://localhost:631/ ) named pdfprint with the following details:
device: Virtual Printer (PDF Printer) make: PostScript model: generic postscript color printer...
Now edit your smb.conf, and add a printer named pdfprint
[pdfprint] printable=yes comment=Print to PDF path=/tmp create mask=0700
Reload samba by running /etc/init.d/samba restart.
Now you have a printer share called pdfprint, and when you print to it with a PS printer driver you get your PDF file produced and left in your home directory.
I collected this informations mainly from here. Respect to the author Volker C. Behr.
This article can be found online at the Debian Administration website at the following bookmarkable URL:
This article is copyright 2005 gna - please ask for permission to republish or translate.