fix FitPage with square media (rhbz#2123391)
gs bug 705849 commit 7c33727834bcf59a79402c46fdcde25291805d35
This commit is contained in:
parent
31cd31745a
commit
c1fe0fc0ab
35
ghostscript-9.56-fix-PDFFitPage-with-square-MediaBox.patch
Normal file
35
ghostscript-9.56-fix-PDFFitPage-with-square-MediaBox.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 50e114295a65cceac49123f359e24f2f5007110a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <50e114295a65cceac49123f359e24f2f5007110a.1662477568.git.mjg@fedoraproject.org>
|
||||
From: Ken Sharp <ken.sharp@artifex.com>
|
||||
Date: Tue, 6 Sep 2022 14:39:33 +0100
|
||||
Subject: [PATCH] GhostPDF + GS - fix PDFFitPage with square MediaBox
|
||||
|
||||
Bug #705849 "New PDF interpreter errors out with PDFFitPage"
|
||||
|
||||
If the input PDF file had square media then we would correctly decide
|
||||
we did not need to rotate the media for a better fit, but we left the
|
||||
values we would normally use to calculate if rotation was required on
|
||||
the operand stack, resulting in an error.
|
||||
|
||||
Pop the unused values.
|
||||
|
||||
Signed-off-by: Michael J Gruber <mjg@fedoraproject.org>
|
||||
---
|
||||
Resource/Init/pdf_main.ps | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps
|
||||
index 3259c0fe3..27eb7ab33 100644
|
||||
--- a/Resource/Init/pdf_main.ps
|
||||
+++ b/Resource/Init/pdf_main.ps
|
||||
@@ -364,6 +364,7 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if
|
||||
3 1 roll eq
|
||||
or % square media or square page, no point in rotating
|
||||
{
|
||||
+ pop pop pop pop
|
||||
//false
|
||||
}
|
||||
{
|
||||
--
|
||||
2.37.2.827.g188294c313
|
||||
|
@ -45,7 +45,7 @@
|
||||
Name: ghostscript
|
||||
Summary: Interpreter for PostScript language & PDF
|
||||
Version: 9.56.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
|
||||
License: AGPLv3+
|
||||
|
||||
@ -103,6 +103,7 @@ BuildRequires: make
|
||||
# Upstream patches -- official upstream patches released by upstream since the
|
||||
# ---------------- last rebase that are necessary for any reason:
|
||||
#Patch000: example000.patch
|
||||
Patch: ghostscript-9.56-fix-PDFFitPage-with-square-MediaBox.patch
|
||||
|
||||
# Downstream patches -- these should be always included when doing rebase:
|
||||
# ------------------
|
||||
@ -433,6 +434,9 @@ done
|
||||
# =============================================================================
|
||||
|
||||
%changelog
|
||||
* Tue Sep 06 2022 Michael J Gruber <mjg@fedoraproject.org> - 9.56.1-2
|
||||
- fix FitPage with square media (rhbz#2123391)
|
||||
|
||||
* Mon Aug 01 2022 Richard Lescak <rlescak@redhat.com> - 9.56.1-1
|
||||
- Rebase to new gs version 9.56.1 (#2072297)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user