[cups.general] how to add custom postscript at the head
Helge Blischke
h.blischke at acm.org
Thu Oct 13 06:21:47 PDT 2011
Evert Mouw wrote:
> I need to add custom postscript commands to get documents to print.
> Something like:
>
> %!OCE *JEC BEGIN
> %!OCE somerandomstuff
> %!OCE *JEC BODY
> %!PS-Adobe-3.0
>
> So, even before the PS-Adobe line.
>
> I was playing a bit with the PPD file and downloaded the PPD specs. It's
> stupid, I tried for hours, but I could not find out how to do this,
> although it should be simple...
>
> Any hints?
>
> Thanks, Evert
If the "somerandomstuff" only depends on the printer, not on the individual
jobs, you could put the lines as a value to the
*JCLBegin:
keyword into the printr's PPD.
Otherwise you need to write a filter which computes the "somerandonstuff"
from the job data and/or the job attributes (or whatever sources you need to
consider) and force use of this filter by the PPD statement
*cupsFilter: "application/vnd.cups-postscript 0 yourfilter"
and put this filter into the /usr/lib/cups/filter directory.
Helge
More information about the cups
mailing list