Filter - backend communication example?

Paul Newall p.newalls at ntlworld.com
Fri Feb 5 13:16:17 PST 2010


> Michael Sweet wrote:
>
> > On Feb 5, 2010, at 7:52 AM, Paul Newall wrote:
> >> ...
> >> Update 5/feb/2010:
> >> I cut my filter right down to a minimum and called it directly in the PPD
> >> file: *FoomaticRIPCommandLine: "myminifilter %A"
> >
> > OK, if you are wrapping your driver in Foomatic you're going to run into
> > problems like these. Real CUPS drivers should NEVER use Foomatic, which is
> > just (and should remain) a wrapper for existing Ghostscript drivers and
> > tries to support multiple spoolers (not just CUPS) which means it has
> > trouble supporting all of the CUPS printing functionality.
> >
> > ___________________________________________________
> > Michael Sweet, Senior Printing System Engineer
>
> I think what is needed is that the backend flushes the output to the
> printer, but the fflush(stdout) in the filter only flushes the pending stuff
> to the backend only (if the filter is wrapped by foomatic or not).
>
> Helge

My filter is only wrapped in foomatic because my starting point was an existing driver which was foomatic, and I would have got nowhere with the project without that headstart. So maybe I'll try and move away from foomatic now.

Helge makes the crucial point, I need the backend to send a short command packet to the printer, so that I can either read the reply (or just delay long enough to let the reply happen) before I send the print data.

Paul Newall




More information about the cups mailing list