Skip to content

Commit

Permalink
ppd-cache.c: Check for urf-supported if image/urf is found
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
zdohnal committed Feb 14, 2024
1 parent 2337ffd commit cad72dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cups/ppd-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cad72dc

Please sign in to comment.