summaryrefslogtreecommitdiff
path: root/Resource
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2022-03-03 10:54:26 +0000
committerKen Sharp <ken.sharp@artifex.com>2022-03-03 10:54:26 +0000
commit8fab1d6ef568f56b4b9dcd8bafe1840e6e71f12b (patch)
tree6d79059d032aefad820950e2b1593140c70980aa /Resource
parent8f0ea507e3b3383dbc9b93c43399dd4745810ad3 (diff)
downloadghostpdl-8fab1d6ef568f56b4b9dcd8bafe1840e6e71f12b.tar.gz
PDF interpreter - fix FitPage
When rewriting FitPage for the new interpreter I seem to have left part of the debugging code in place, which led to two incorrect values on the stack when we calculated the scale factor. I general these values were zero, leading to a scale factor of 0 and nothing being drawn. Fixed here by removing the extraneous values.
Diffstat (limited to 'Resource')
-rw-r--r--Resource/Init/pdf_main.ps4
1 files changed, 1 insertions, 3 deletions
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps
index 0841b275f..a82451d93 100644
--- a/Resource/Init/pdf_main.ps
+++ b/Resource/Init/pdf_main.ps
@@ -405,8 +405,7 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if
% Stack - box boxwidth boxheight mediawidth mediaheight
% Incorporate up any offset from 0,0
- 4 index aload pop pop pop neg exch neg exch
- 2 copy exch
+ 4 index aload pop pop pop neg exch neg
translate
% Now use the box and media values to calculate the required x/y scale factors
@@ -419,7 +418,6 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if
gt {exch} if % select smallest scale factor
pop %
dup scale % and scale page isomorphically
- pop pop
} bind def
/newpdf_get_media_box { % <pagedict> get_media_box <box> <bool>