if banners enabled, how does backend get print job file?
Helge Blischke
h.blischke at acm.org
Fri May 18 13:42:24 PDT 2012
Ted Tanaka wrote:
> I wrote a custom backend, and it receives the print job via stdin just
> fine when banners are disabled. But when banners are enabled, the backend
> gets the first banner page as stdin, and the print job and second banner
> page are not processed by the backend.
>
> Also, they are stored as 3 separate files in /var/spool/cups, so I know
> CUPS is correctly processing the job.
>
> Can someone tell me how my backend can access both the banner pages and
> the file to be printed? The backend appears to only be called once for
> the entire print job (2 banner files and user file).
>
> Thanks!
When printing starts, all three files - preceding banner, user file,
following banner - are concatenated by the scheduler.
In case of PostScript as the final content-type, each of these parts is
followed by a CTRL D (0x04), which your backend needs to account for.
An example (created by CUPS 1.4.6; changeover from banner page to user
file):
%%Trailer
%%Pages: 1
%%BoundingBox: 12 12 583 830
%%EOF
^D%!PS-Adobe-3.0
%%Creator: GPL Ghostscript 905 (ps2write)
%%LanguageLevel: 2
%%CreationDate: D:20120508160948+02'00'
Helge
More information about the cups
mailing list