Skip to content

Commit

Permalink
libcupsfilters: In the PPD generator give priority to Apple Raster ag…
Browse files Browse the repository at this point in the history
…ainst PDF

(cherry picked from commit 1b39096)
  • Loading branch information
tillkamppeter committed Dec 20, 2020
1 parent e33e464 commit a6807df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ NEWS - OpenPrinting CUPS Filters v1.28.6 - 2020-12-02

CHANGES IN V1.28.7

- libcupsfilters: In the PPD generator give priority to Apple
Raster against PDF (Issue #331).
- libcupsfilters: Added NULL check when removing ".Borderless"
suffixes from page size names (Issue #314, Pull request
#328).
Expand Down
6 changes: 3 additions & 3 deletions cupsfilters/ppdgenerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,7 @@ ppdCreateFromIPP2(char *buffer, /* I - Filename buffer */
formatfound = 1;
is_pdf = 1;
} else if (cupsArrayFind(pdl_list, "application/pdf")) {
cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 0 -\"\n");
cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 100 -\"\n");
manual_copies = 0;
formatfound = 1;
is_pdf = 1;
Expand Down Expand Up @@ -1992,7 +1992,7 @@ ppdCreateFromIPP2(char *buffer, /* I - Filename buffer */
if (cupsArrayCount(current_res) > 0 &&
joinResolutionArrays(&common_res, &current_res, &common_def,
&current_def)) {
cupsFilePuts(fp, "*cupsFilter2: \"image/urf image/urf 100 -\"\n");
cupsFilePuts(fp, "*cupsFilter2: \"image/urf image/urf 0 -\"\n");
if (formatfound == 0) manual_copies = 1;
formatfound = 1;
is_apple = 1;
Expand All @@ -2010,7 +2010,7 @@ ppdCreateFromIPP2(char *buffer, /* I - Filename buffer */
if ((current_res = ippResolutionListToArray(attr)) != NULL &&
joinResolutionArrays(&common_res, &current_res, &common_def,
&current_def)) {
cupsFilePuts(fp, "*cupsFilter2: \"image/pwg-raster image/pwg-raster 0 -\"\n");
cupsFilePuts(fp, "*cupsFilter2: \"image/pwg-raster image/pwg-raster 10 -\"\n");
if (formatfound == 0) manual_copies = 1;
formatfound = 1;
is_pwg = 1;
Expand Down

0 comments on commit a6807df

Please sign in to comment.