From b7d6d6f37e32201b653cb363f06fe06b884c72ba Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 13 Feb 2024 08:20:52 +0100 Subject: [PATCH] ppd-cache.c: Check for `urf-supported` if `image/urf` is found Some devices have `image/urf` in `document-format-supported`, but is missing `urf-supported` if AirPrint support is turned off, which breaks PPD generation. Check for attribute `urf-supported` when we are about to decide whether the printer uses AirPrint, so in case the device supports another driverless standard, we can use it for PPD generation. Fixes [Fedora issue](https://bugzilla.redhat.com/show_bug.cgi?id=2263053) --- cups/ppd-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index 523e4dfc8f..737e872912 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -3435,7 +3435,7 @@ _ppdCreateFromIPP2( if ((attr = ippFindAttribute(supported, "document-format-supported", IPP_TAG_MIMETYPE)) != NULL) { - is_apple = ippContainsString(attr, "image/urf"); + 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;