Print job not deleting when no output from filter?

Helge Blischke h.blischke at acm.org
Mon Aug 9 08:58:38 PDT 2010


Tim Pushor wrote:

> Hello,
> 
> We have implemented a fill-out form based printing system for a legacy
> application in which we essentially print a file of key/value pairs
> which a filter script (as defined in convs) fills out fields in a PDF
> file and outputs the filled out PDF.
> 
> This has worked very well for us. So well in fact that we decided to
> expand on it and allow the system to also email and fax these forms from
> our application. If we want to print or email a form, we print to a null
> printer (file://dev/null), and the filter script handles dispatching the
>   form off to hylafax or attaches it to an email and sends it off.
> Again, this works very well.
> 
> The problem is that in this case, the filter script does not output
> anything, we get a log entry in the CUPS error file:
> 
>> E [06/Aug/2010:16:36:33 -0600] [Job 391892] Empty print file!
> 
> And the print job does not get deleted. After a while these jobs pile up
> and CUPS will no longer accept jobs.
> 
> I'm using cups 1.2.4 (from CentOS / RHEL)
> 
> There are ways that I can get around it, but does anyone have any
> suggestions as to how I - from a filter script - can tell the print
> system that I don't actually want to print anything and the print job
> should get deleted?
> 
> Thanks,
> Tim

Obviously your filter (that forwards the stuff to hylafax etc.) is, 
according to the data flow, the last element in the prcessing chain.
I'd therefore install this filter as a backend. If that exits with a return 
code of zero (CUPS_BACKEND_OK), the job's data file(s) will be trahsed as 
expected.

Helge






More information about the cups-devel mailing list