From 0736b61d800cdf866311a60f4b16e4b1fd38230e Mon Sep 17 00:00:00 2001 From: Alexander Pevzner Date: Sun, 22 Oct 2023 22:07:20 +0300 Subject: [PATCH] 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. --- cups/ppd-cache.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 */ -- 2.47.2