diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2022-07-06 11:02:47 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2022-07-06 14:49:50 +0100 |
commit | 8b768ecc91efe7510f76370f9c01d2f9ea3fef55 (patch) | |
tree | be73059949cf6784ab6a4a4f35a1c5eaff1fa955 /Resource | |
parent | f5d3e6405c33f7c91d171624c419679cba2d70eb (diff) | |
download | ghostpdl-8b768ecc91efe7510f76370f9c01d2f9ea3fef55.tar.gz |
Store /EPSBoundingBoxString in global VM
When doing the special processing for EPS files, we store the string from
the %%BoundingBox comment in systemdict so it can be accessed later for
doing fit page functionality.
Problem is, the special EPS handling is done in between save/restore operations,
meaning the string is restored away while a reference to it remains in
systemdict, potentially causing problems.
Moving the string to global VM resolves the problem
Diffstat (limited to 'Resource')
-rw-r--r-- | Resource/Init/gs_epsf.ps | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Resource/Init/gs_epsf.ps b/Resource/Init/gs_epsf.ps index 7f2329d6a..fce2e2363 100644 --- a/Resource/Init/gs_epsf.ps +++ b/Resource/Init/gs_epsf.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2022 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -120,7 +120,9 @@ % even if HiResBoundingBox occurs first in the EPS file. //systemdict /EPSBoundingBoxState get 1 index lt { % save the BBoxString for possible FitPage when EndComments is seen - exch dup //systemdict /EPSBoundingBoxString 3 -1 roll .forceput + exch dup currentglobal //true setglobal exch + dup length string copy //systemdict /EPSBoundingBoxString 3 -1 roll .forceput + setglobal EPSBoundingBoxParse { //systemdict /EPSCrop known { |