Intercepting the fd for printing
mike at easysw.com
Fri Jan 25 10:08:04 GMT 2002
Moody, Todd wrote:
> Hello all-
> I am looking at integrating Samba 2.2.2 into an embedded printing device,
> where limited spooling space for print jobs exists. Samba's model of
> spooling an entire job before submitting it to the printing interface is
> going to be a problem in this environment.
> I am hoping, instead, to intercept the fd of the spool file and substitute
> it with a pipe to another process that will submit the print data for
> printing on the fly.
> Can anyone provide suggestions or insight into a clean(ish) way to do this?
>>From reading through the code so far, it appears I may be able to accomplish
> this by creating a pipe in print_job_start().
> Many thanks for any feedback-
On a related note, this opens up some possible improvements for the
CUPS support as well, since you can stream print data to an IPP
server (via HTTP chunking, transparent to SAMBA/any app), and you
can also pipe into lp/lpr without trouble.
*However*, I think one issue is that pipes can block, which might
cause problems? Also, SMB printing is inherently file-based,
Michael Sweet, Easy Software Products mike at easysw.com
Printing Software for UNIX http://www.easysw.com
More information about the samba-technical