Skip to content

Commit

Permalink
libcupsfilters: In PPD generator create only one *cupsFilter2: line f…
Browse files Browse the repository at this point in the history
…or raster

If a printer supports more than one raster format (Apple Raster, PWG
Raster, PCLm), create only one "*cupsFilter2: ..." line for raster,
for the most desirable/reliable raster format.

Most preferred is Apple Raster, then PWG Raster, and after that PCLm

See

    #498

Here a printer works correctly with Apple Raster but does not print
the page in its original size with PWG Raster.
  • Loading branch information
tillkamppeter committed Jan 25, 2023
1 parent 54608f9 commit 05f7344
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cupsfilters/ppdgenerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,7 @@ ppdCreateFromIPP2(char *buffer, /* I - Filename buffer */
}
}
#endif
if (cupsArrayFind(pdl_list, "image/pwg-raster")) {
if (!is_apple && cupsArrayFind(pdl_list, "image/pwg-raster")) {
if ((attr = ippFindAttribute(response,
"pwg-raster-document-resolution-supported",
IPP_TAG_RESOLUTION)) != NULL) {
Expand All @@ -2039,7 +2039,7 @@ ppdCreateFromIPP2(char *buffer, /* I - Filename buffer */
}
}
#ifdef QPDF_HAVE_PCLM
if (cupsArrayFind(pdl_list, "application/PCLm")) {
if (!is_apple && !is_pwg && cupsArrayFind(pdl_list, "application/PCLm")) {
if ((attr = ippFindAttribute(response, "pclm-source-resolution-supported",
IPP_TAG_RESOLUTION)) != NULL) {
if ((defattr = ippFindAttribute(response,
Expand Down

0 comments on commit 05f7344

Please sign in to comment.