Job NOT being filtered
Helge Blischke
h.blischke at srz.de
Wed May 23 07:22:04 PDT 2007
Stefan Adams wrote:
>>Stefan Adams wrote:
>>
>>>It's possible to filter a job of text sent from the command line, right?
>>>
>>>Like this:
>>>
>>># echo hi | lpr
>>>
>>># cat /etc/cups/*.{types,convs}
>>>text/hi printable(0,1024) + string(0,hi)
>>>text/hi application/vnd.cups-postscript 3 skeleton
>>>
>>># ls -l /usr/lib/cups/filter/skeleton
>>>-rwxr-xr-x 1 root root 3522 May 22 20:01 /usr/lib/cups/filter/skeleton*
>>>
>>># cat /usr/lib/cups/filter/skeleton
>>>#!/usr/bin/perl
>>>$|=1;
>>>open TMP, ">/tmp/skeleton.tmp";
>>>print TMP qx{date};
>>>close TMP;
>>>exit 0;
>>>[...]
>>
>>What springs to my eyes at the first glance is that your
>>filter does not follow the filter calling conventions.
>
>
> Filter calling conventions? Please explain?
>
> I've removed out every piece possible to make this as simple as possible. I've started with Andreas Bohne-Lang's Cups Filter/Backend NOP and could not get it to work. I've tried and tried again and have reduced it all to the most simple stuff I can think of. At this point, I don't even care if it prints, the problem is that the filter is not being executed at all.
>
> I've even tried in my .convs file:
>
> */* application/vnd.cups-postscript 3 skeleton
>
> But skeleton will not get run!
>
>
>>Helge
>>
>>
>>--
A CUPS compatible filter needs to accept the following command line
options (in this order):
job-id (an integer)
username
job-title
number-of-copies (an integer)
job-options (a string containing the options separated by white space)
file-to-print (this is optional, if not provieded, the filter needs
to read from STDIN).
The filter's output *MUST* go to STDOUT.
And, when introducing a new filter, you need to restart CUPS
(or at least issue a kill -HUP pidof(cupsd) to force a
reload).
For further details, see the documentation (which came with your
distribution, or read the documentation at www.cup.org)
Helge
--
Helge Blischke
Softwareentwicklung
H.Blischke at acm.org
More information about the cups
mailing list