[cups.general] Rastertocard filter

Michael R Sweet msweet at apple.com
Sun Aug 17 10:54:13 PDT 2008


shermin wrote:
> Hi,
> I am developing my filter for my card printer.My printer cmd is actually based on usb mass storage device,Sending the cmd thru "CBW" and read the status through "CSW".But in standard filters coming with CUPS commands are send using printf.In my case if i use "usb_bulk_write" whether my filter will work.??How will i map it to "printf" in cupsd.
> Or if i use putchar a,how will i read the status from the printer?????

There are a few ways to approach this.

First, you can write your backend so that it either understands the
printer commands you write to stdout from the filter (which your
backend sees on its stdin) and then follow the write with a read
that you relay back to the filter via cupsBackChannelWrite.

Second, you can add a packet/command layer to the data you write from
the filter that your backend understands - basically, an extra layer
on top of the printer commands.  Again, the backend would read the
data from the filter and read/write as needed.

Finally, you can move the printer driver stuff into your backend, and
have the PPD file specify that the printer supports CUPS raster data
directly.  Then your filter (now a backend) can communicate directly
with the printer...

-- 
______________________________________________________________________
Michael R Sweet                        Senior Printing System Engineer





More information about the cups mailing list