From: Zdenek Dohnal Date: Wed, 14 Feb 2024 14:38:01 +0000 (+0100) Subject: ppd-cache.c: Check for PWG attribute as well X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04a0c2911217dbf66660a350d94104ef5b86011d;p=thirdparty%2Fcups.git ppd-cache.c: Check for PWG attribute as well If the device reports image/pwg-raster and we are about to use it, check for pwg-raster-document-resolution-supported too. --- diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index 737e872912..ec0de56a72 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -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");