[cups.general] Printing multiple copies when file comes from

Steve Bergman steve at rueb.com
Fri Mar 4 08:37:28 PST 2005


Helge Blischke wrote:

>Steve Bergman wrote:
>  
>
>You didn't tell what CUPS version you are using. Generally, if the
>printer
>supports collated copies, the number of copies requested will be
>inserted
>into the PostScript stream. Only if the printer is known not to support
>collated copies, the input (without the header, prolog, and setup)
>is copied the respective times to the printer, regardless of the input
>source.
>
>  
>
Cups 1.1.22.

This is a band printer.  SCO Open Server's spooler (and its 
predecessors) has handled multiple copies on *any* printer for literally 
decades.

Take a look at the code of the backend.  (The one I'm looking at is 
"serial" but the others look quite similar.)

If the file is specified as an argument, it reads the file and writes it 
out to the device, lseeks back to 0 and then reads and writes again for 
as many copies as specified.

However, it the file name is not given, it explicitly sets copies to 1 
and reads and writes the file exactly once, since it can't lseek back to 
the beginning of stdin.

Oddly, if a filename is specified to lpr, the backend gets called with 
that filename.  However, if lpr is getting its input from stdin, the 
backend is told to read from stdin as well, meaning that multiple copies 
can never work to a dot matrix, or band printer, or any other printer 
that does not support multiple copies internally, when lpr gets it's 
input from stdin.

This is quite broken behavior and not documented.

-Steve





More information about the cups mailing list