Skip to content

Commit

Permalink
ppd-cache.c: Check for PWG attribute as well
Browse files Browse the repository at this point in the history
If the device reports image/pwg-raster and we are about to use it, check
for pwg-raster-document-resolution-supported too.
  • Loading branch information
zdohnal committed Feb 14, 2024
1 parent cad72dc commit 04a0c29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cups/ppd-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -3437,7 +3437,9 @@ _ppdCreateFromIPP2(
{
is_apple = ippContainsString(attr, "image/urf") && (ippFindAttribute(supported, "urf-supported", IPP_TAG_KEYWORD) != NULL);
is_pdf = ippContainsString(attr, "application/pdf");
is_pwg = ippContainsString(attr, "image/pwg-raster") && !is_apple;
is_pwg = ippContainsString(attr, "image/pwg-raster") && !is_apple &&
(ippFindAttribute(supported, "pwg-raster-document-resolution-supported", IPP_TAG_KEYWORD) != NULL) &&
(ippFindAttribute(supported, "pwg-raster-document-type-supported", IPP_TAG_KEYWORD) != NULL);

if (ippContainsString(attr, "image/jpeg"))
cupsFilePuts(fp, "*cupsFilter2: \"image/jpeg image/jpeg 0 -\"\n");
Expand Down

0 comments on commit 04a0c29

Please sign in to comment.