header.NumCopies

Kurt Pfeifle kpfeifle at danka.de
Thu Mar 29 09:26:15 PDT 2007


> In my rasterfilter I receive a raster and then transform it to the
> approprate format. I used the rater to epson and ratertodymo as a template,
> so there is a StartPage, cupsRasterReadPixels, OutputLine and EndPage,
> which are called from main in while (cupsRasterReadHeader(ras, &header)).
>
> Everything fine, until we started testing for multiple copies. It seems
> that in OS X if a page is printed several times, there is an option in
> header to say how many copies are printed.
>
> No sweat, just loop through the number of copies, I thought, doing a
> startpage, cupsRasterReadPixels, OutputLine and Endpage several times.
>
> That seems not to be possible. The rasterstream apparently only read
> once. Is it somehow possible to reset the raster to the begin of the
> stream, or is there a better way to print multiple copies?
>
>
> Johan Henselmans


I'm not 100% sure -- but I'll try:

Since your custom filter probably needs a custom line in the PPD describing the printer using this filter

   *cupsFilter:  "application/vnd.cups-raster 333 rastertowhatever"

the PPD should probably also contain a line saying:

   *cupsManualCopies: true

which tells the CUPS backend (whichever one is used to send print data to the physical printer) that it has to send the file multiple times if the number of copies is more than 1.

That way your filter doesn't need to care at if your physical printers are unable to generate multiple copies themselves (which would use a "*cupsManualCopies: false" entry in the PPD [or an empty one, because it is the default for PostScript printers to generate the copies]); this function is taken care of by the CUPS framework.


--
Kurt Pfeifle
System & Network Printing Consultant -- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH  ...................  Hedelfinger Strasse 58
A RICOH Company  .........................  D-70327 Stuttgart/Germany








More information about the cups-devel mailing list