pdf

pdf


Pdf is a simple ps2pdf conversion backend.

Download pdf



NAME

pdf


DESCRIPTION

This is a simple Perl PDF backend that uses ghostscript ps2pdf to take a postscript job and convert it to a pdf. I saw a shell script somewhere that did something similar and decided to write my own in Perl.

Example URIs: pdf://var/spool/pdf


REQUIREMENTS

1) Perl

2) Ghostscript tool ps2pdf

3) The File::Copy Perl module

4) A raw or non-raw print queue that receives Postscript


INSTALLATION

Download the script and copy it into the CUPS backends directory, which is typically /usr/lib/cups/backend. Once there, you have to send CUPS a SIGHUP for it to re-scan all the available backends. Do a 'killall -HUP cupsd', or use the init script: '/etc/init.d/cups reload'. A restart will work just as well, but no real need to stop and start the server daemon.

Now check the web interface. When creating or modifying printers, you should see an option for a "PDF Writer" in the dropdown box of available devices. If not, make sure the permissions on the file are chmodded to 755 and owned by the correct user:group (check the rest of the files in the directory and match it).


CONFIGURATION

Variables in the conf hash can be set in script, affecting all queues, or can be overridden on a per-queue basis through an external configuration file. The $queues_conf variable determines location, default /etc/cups/queues.conf.

qconf

The qconf file is formatted exactly like the printcap file, except that comments, blank lines, and whitespace between all elements are allowed. All variables above can be overridden on a per-queue basis. Location is determined by the queues_conf variable. If this file does not exist, variable values are simply those set in the script. Example file:

 # TEST1 has debugging, saving jobs, and factor four set
 TEST1|debug:save_jobs
 
 # TEST2 is identical
 TEST2 | debug : save_jobs
 
 # Some other random configuration
 TEST3 | check_user : check_job


CHANGES

pdf 1.02 (20120421)

- All script variables can be overridden on a per-queue basis using new "qconf" configuration file format. Most variables renamed in a more consistent manner to fit with this scheme.

- Integrated perldoc.

pdf 1.01 (20051129)

- Much saner handling of temp file creation.

- Other miscellaneous stuff.

pdf 1.00 (20040708)

- Roughly based on shell pdf backend from somewhere.