Closed psz2036 closed 3 months ago
Whether copies are handled or not depends on the filter and the destination MIME media type. cupsd doesn't know which filters will do what processing, so it MUST provide the number of copies to all of the filters and the backend.
You say that cupsd is in charge of deciding which filters to invoke, but must not care what they do? Then they must duplicate code, second-guessing what any other filters may possibly do.
CUPS may invoke several filters, and a backend, for each print job. Each of those sub-processes may handle ManualCopies and num_copies requested, and this may result in N*N or N*N*N copies produced. Looking in source file scheduler/job.c all those filter and backend sub-processes are invoked with the same argument list, which contains the num_copies requested.
Asking all means that each need to handle the setting of ManualCopies. Worse, when ManualCopies is set then all should produce copies, producing N*N or N*N*N etc copies.
Would not it be best (cleaner, simpler, more likely correct) to ask just one to do copies? Ask one of the filters when ManualCopies is set, ask the backend when not.
Asking all (or more than one), there should be some mechanism for the filters to report whether copies were done, and pass that info on to the others. We do seem to collect reports of "impressions", but start all filters and backend at same time and with the same original setting of copies.
Cheers, Paul
Paul Szabo psz@maths.usyd.edu.au www.maths.usyd.edu.au/u/psz School of Mathematics and Statistics University of Sydney Australia