From fd7190c1c21b453119969a6daf525a8d1e653c86 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 19 Aug 2018 07:49:10 -0400 Subject: [PATCH] Fix shared printing using the IPP Everywhere driver (Issue #5361) --- CHANGES.md | 2 ++ cups/ppd-cache.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 30834f94e3..078372cae3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,8 @@ Changes in CUPS v2.3b6 - The scheduler did not report all of the supported job options and values (Issue #5340) - Fixed some typos in the label printer drivers (Issue #5350) +- The IPP Everywhere "driver" no longer does local filtering when printing to + a shared CUPS printer (Issue #5361) - The scheduler was being backgrounded on macOS, causing applications to spin (rdar://40436080) - The scheduler did not validate that required initial request attributes were diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index 178b22dfc7..827eba5d3b 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -3221,7 +3221,17 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */ if (ippContainsString(attr, "image/png")) cupsFilePuts(fp, "*cupsFilter2: \"image/png image/png 0 -\"\n"); if (is_pdf) - cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 10 -\"\n"); + { + /* + * Don't locally filter PDF content when printing to a CUPS shared + * printer, otherwise the options will be applied twice... + */ + + if (ippContainsString(attr, "application/vnd.cups-pdf")) + cupsFilePuts(fp, "*cupsFilter2: \"application/pdf application/pdf 0 -\"\n"); + else + cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 10 -\"\n"); + } if (is_apple) cupsFilePuts(fp, "*cupsFilter2: \"image/urf image/urf 100 -\"\n"); if (is_pwg) -- 2.47.2