From: Michael Sweet Date: Tue, 18 Jul 2017 14:10:16 +0000 (-0400) Subject: The IPP backend incorrectly sent the "job-pages-per-set" attribute to PDF X-Git-Tag: v2.2.5~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49f495c32ea222a7d4f7b1e643203105eb67df40;p=thirdparty%2Fcups.git The IPP backend incorrectly sent the "job-pages-per-set" attribute to PDF printers (rdar://33250434) Need to save the original number of copies and only send "job-pages-per-set" when the copy count is reset to 1 (as happens when printing with a raster format...) --- diff --git a/CHANGES.md b/CHANGES.md index eeedf34ecb..4830398573 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -16,6 +16,8 @@ CHANGES IN CUPS V2.2.5 an incompatible command-line syntax (Issue #5050) - The --enable-libtool configure option requires a path to the libtool program, but doesn't document or check for it (Issue #5062) +- The IPP backend incorrectly sent the "job-pages-per-set" attribute to PDF + printers (rdar://33250434) CHANGES IN CUPS V2.2.4 diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index f41b4387d1..8ce02fc19b 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -78,6 +78,8 @@ _cupsConvertOptions( int num_finishings = 0, /* Number of finishing values */ finishings[10]; /* Finishing enum values */ ppd_choice_t *choice; /* Marked choice */ + int finishings_copies = copies; + /* Number of copies for finishings */ /* @@ -366,13 +368,13 @@ _cupsConvertOptions( { ippAddIntegers(request, IPP_TAG_JOB, IPP_TAG_ENUM, "finishings", num_finishings, finishings); - if (copies > 1 && (keyword = cupsGetOption("job-impressions", num_options, options)) != NULL) + if (copies != finishings_copies && (keyword = cupsGetOption("job-impressions", num_options, options)) != NULL) { /* * Send job-pages-per-set attribute to apply finishings correctly... */ - ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-pages-per-set", atoi(keyword) / copies); + ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-pages-per-set", atoi(keyword) / finishings_copies); } }