[cups] cups, own interface and gziptoany

Helge Blischke helgeblischke at web.de
Fri Aug 12 07:17:30 PDT 2016


> Am 10.08.2016 um 13:26 schrieb Daniel Spannbauer <ds at marco.de>:
> 
> Hallo,
> 
> I have configured a printer in cups. This printer uses via an interface
> script a self written driver (which is an gawk script).
> 
> The interface contains:
> /etc/cups/filters/ownfilter < $6
> 
> Don't know why, but sometimes cups starts a filter "gziptoany" before
> the filter is started. But now, $6 is empty and the interface script
> can't work.
> 
> But why is cups useing gziptoany here? The input is only plain ascii text.
> 
> cups is 1.5.4
> 
> Any hints?
> 
> Regards
> 
> Daniel
> 
> 

From a quick glance at the sources (1.5.x) it seems that a job file which begins with
0x1f 0x8b causes the gziptoany filter to be used as the very first filter (even if the printer
is configured as using a sys5 interface script (see cups/file.c).
The gezitoany filter in turn copies the possibly decompressed input to STDOUT
(in fact it does nothing else if the input turns out not to be a real gzipped file).

So you need to modify your gawk script to treat stdin as a possible alternate input source.

Helge




More information about the cups mailing list