Confusion on the copies attribute

Helge Blischke H.Blischke at srz-berlin.de
Fri Aug 13 10:10:03 PDT 2004


I'm confused about the semantics of the copies attribute when printing
PostScript files.
There are two completely different methods to specify the number of
copies:
(1) in the PostScript job itself, by the application which creates
    the PostScript file, e.g.:
	<</NumCopies 5>> setpagedevice
(2) as an option to the lp or lpr command, by the app/person 
    issuing the command.

As a "naive" user, I would assume to have a choice which method to 
use and, if I select method (1), I'd assume CUPS not to interfere
with this setting.

But, even if I don't specify a number of copies on the command line,
the CUPS scheduler defaults the number of copies to 1. This may lead
to queer results:

a) with "normal" printing (i.e. no "raw" option specified) the job
   is fed through the pstops filter, which results in the PS job
   containing - in the following order - both the statements
	<</NumCopies 1>> setpagedevice		% inserted by pstops
	% ... some more stuff in the setup section
	<</NumCopies 5>> setpagedevice		% the original
   This causes no harm, as the original setting gets active
   before any marks are put onto the first page.

   In addition, the copies value of 1 faked by the scheduler is
   passed as a command line option to all filters and the backend,
   and that is where the confusion starts:

   The IPP backend adds the copies attribute with value 1 to the
   print request. The actual number of copies printed is then
   implementation dependent:
   with some printers the copies value submitted in the IPP request
   takes precedence over the specification in the PS job itself,
   other printers treat both values as completely independent of
   each other, which results the total number of copies to be
   the product of both values.

   Other backends seem not to be affected, since they feed the
   print data only once to the printer.

b) with raw printing (no filters involved) the situation gets
   worse:  "conventional" backends then copy the print data 
   as many times to the printer as the copies value from the
   command line.

What I think would be needed is to completely ignore the 
copies attribute if not specified in the lp or lpr command.

As the IPP RFCs do not adress this issue (at least I didn't
find any hints), I'd like some other opinions before I start
filing a STR.

Helge



-- 
H.Blischke at srz-berlin.de
H.Blischke at srz-berlin.com
H.Blischke at acm.org




More information about the cups-devel mailing list