From 168f93dd9f41f57e6d864407adbce3a87ec392c6 Mon Sep 17 00:00:00 2001 From: zdohnal Date: Tue, 30 Jul 2024 13:48:36 +0200 Subject: [PATCH] Prefer PDF again (fixes #42) (#44) PDF works better with finishing, especially combinations of multiple copies, collation, and stapling/binding. --- ppd/ppd-generator.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ppd/ppd-generator.c b/ppd/ppd-generator.c index 1588b8bd..56667d53 100644 --- a/ppd/ppd-generator.c +++ b/ppd/ppd-generator.c @@ -722,6 +722,14 @@ ppdCreatePPDFromIPP2(char *buffer, // I - Filename buffer formatfound = 1; is_pdf = 1; } + else if (cupsArrayFind(pdl_list, "application/pdf")) + { + // PDF printer + cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 0 -\"\n"); + manual_copies = 0; + formatfound = 1; + is_pdf = 1; + } #ifdef CUPS_RASTER_HAVE_APPLERASTER else if (cupsArrayFind(pdl_list, "image/urf") && (ippFindAttribute(supported, "urf-supported", IPP_TAG_KEYWORD) != NULL)) @@ -843,14 +851,6 @@ ppdCreatePPDFromIPP2(char *buffer, // I - Filename buffer } } #endif - else if (cupsArrayFind(pdl_list, "application/pdf")) - { - // PDF printer - cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 0 -\"\n"); - manual_copies = 0; - formatfound = 1; - is_pdf = 1; - } else if (cupsArrayFind(pdl_list, "image/pwg-raster") && ippFindAttribute(supported, "pwg-raster-document-type-supported", IPP_TAG_KEYWORD) != NULL && (attr = ippFindAttribute(supported, "pwg-raster-document-resolution-supported", IPP_TAG_RESOLUTION)) != NULL)