From e7f2e21d5a519222878af62dfffeb704840717d5 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Feb 18 2023 00:20:18 +0000 Subject: import ghostscript-9.27-6.el8 --- diff --git a/SOURCES/ghostscript-9.27-ESC-Page-driver-does-not-set-page-size-correctly.patch b/SOURCES/ghostscript-9.27-ESC-Page-driver-does-not-set-page-size-correctly.patch new file mode 100644 index 0000000..e0ba1fe --- /dev/null +++ b/SOURCES/ghostscript-9.27-ESC-Page-driver-does-not-set-page-size-correctly.patch @@ -0,0 +1,22 @@ +diff -x .git -Napur ghostscript-9.27.old/contrib/japanese/gdevespg.c ghostscript-9.27.new/contrib/japanese/gdevespg.c +--- ghostscript-9.27.old/contrib/japanese/gdevespg.c 2019-04-04 00:43:14.000000000 -0700 ++++ ghostscript-9.27.new/contrib/japanese/gdevespg.c 2023-01-24 11:25:32.588189093 -0800 +@@ -273,6 +273,9 @@ escpage_paper_set(gx_device_printer * pd + int width, height, w, h, wp, hp, bLandscape; + EpagPaperTable *pt; + ++ /* Page size match tolerance in points */ ++ #define TOL 5 ++ + width = pdev->MediaSize[0]; + height = pdev->MediaSize[1]; + +@@ -291,7 +294,7 @@ escpage_paper_set(gx_device_printer * pd + } + + for (pt = epagPaperTable; pt->escpage > 0; pt++) +- if (pt->width == w && pt->height == h) ++ if (abs(w - pt->width) <= TOL && abs(h - pt->height) <= TOL) + break; + + fprintf(fp, "%c%d", GS, pt->escpage); diff --git a/SPECS/ghostscript.spec b/SPECS/ghostscript.spec index 244c3d0..d670979 100644 --- a/SPECS/ghostscript.spec +++ b/SPECS/ghostscript.spec @@ -37,7 +37,7 @@ Name: ghostscript Summary: Interpreter for PostScript language & PDF Version: 9.27 -Release: 5%{?dist} +Release: 6%{?dist} License: AGPLv3+ @@ -106,6 +106,7 @@ Patch014: ghostscript-cve-2020-16301.patch # 2097448 - printed text drifts to the right Patch015: ghostscript-9.27-fix-use-of-HWMargins.patch Patch016: ghostscript-9.27-Deal-with-different-VM-modes-during-CIDFont-loading.patch +Patch017: ghostscript-9.27-ESC-Page-driver-does-not-set-page-size-correctly.patch # Downstream patches -- these should be always included when doing rebase: @@ -446,6 +447,10 @@ done # ============================================================================= %changelog +* Thu Feb 02 2023 Richard Lescak - 9.27-6 +- set the page size for A4 correctly in ESC/Page driver +- Resolves: rhbz#2164603 + * Tue Nov 15 2022 Richard Lescak - 9.27-5 - fix loading of CIDFonts - Resolves: rhbz#2118538