From 9240cd70a234a3814f1de6de3dc5ad8e04d1068a Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 2 Dec 2019 14:28:09 -0500 Subject: [PATCH] Use pwgMediaForSize when looking up PPD sizes (Issue #5633) --- CHANGES.md | 2 ++ cups/ppd-cache.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 805a2a1be3..463570d726 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,8 @@ Changes in CUPS v2.3.1 - Documentation updates (Issue #5661, #5674, #5682) - Fixed a crash bug in the web interface (Issue #5621) +- The PPD cache code now looks up page sizes using their dimensions + (Issue #5633) - PPD files containing "custom" option keywords did not work (Issue #5639) - Added a workaround for the scheduler's systemd support (Issue #5640) - On Windows, TLS certificates generated on February 29 would likely fail diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index 5b7c76e850..5965e382bb 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -1075,7 +1075,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */ * Convert the PPD size name to the corresponding PWG keyword name. */ - if ((pwg_media = pwgMediaForPPD(ppd_size->name)) != NULL) + if ((pwg_media = pwgMediaForSize(PWG_FROM_POINTS(ppd_size->width), PWG_FROM_POINTS(ppd_size->length))) != NULL) { /* * Standard name, do we have conflicts?