From: Alexander Pevzner Date: Sun, 22 Oct 2023 19:07:20 +0000 (+0300) Subject: cups/ppd-cache.c: Add cupsUrfSupported to generated PPD (see #804) X-Git-Tag: v2.4.8~41^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F805%2Fhead;p=thirdparty%2Fcups.git cups/ppd-cache.c: Add cupsUrfSupported to generated PPD (see #804) It fixes driverless printing on Pantum BM5100ADW Series and, probably, on many other devices. - Without this parameter, /usr/lib/cups/filter/universal generates RGB image/urf even for monochrome printer - Pantum BM5100ADW Series rejects to print these RGB images with the "Print job canceled at printer" status. - Probably, this issue affects many other devices See #804 for details. --- diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index 40881cd395..7828ea7293 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -3478,6 +3478,20 @@ _ppdCreateFromIPP2( if (!is_apple && !is_pdf && !is_pwg) goto bad_ppd; + /* + * cupsUrfSupported + */ + if ((attr = ippFindAttribute(supported, "urf-supported", IPP_TAG_KEYWORD)) != NULL) + { + cupsFilePuts(fp, "*cupsUrfSupported: \""); + for (i = 0, count = ippGetCount(attr); i < count; i ++) + { + keyword = ippGetString(attr, i, NULL); + cupsFilePrintf(fp, "%s%s", keyword, i ? "" : ","); + } + cupsFilePuts(fp, "\"\n"); + } + /* * PageSize/PageRegion/ImageableArea/PaperDimension */