summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/lib/ps2epsi.ps
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlgs/lib/ps2epsi.ps')
-rwxr-xr-x[-rw-r--r--]Master/tlpkg/tlgs/lib/ps2epsi.ps29
1 files changed, 12 insertions, 17 deletions
diff --git a/Master/tlpkg/tlgs/lib/ps2epsi.ps b/Master/tlpkg/tlgs/lib/ps2epsi.ps
index 66d4ad6618a..615bb15544c 100644..100755
--- a/Master/tlpkg/tlgs/lib/ps2epsi.ps
+++ b/Master/tlpkg/tlgs/lib/ps2epsi.ps
@@ -1,3 +1,4 @@
+
% Copyright (C) 1990, 2000 Aladdin Enterprises. All rights reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -13,7 +14,7 @@
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
-% $Id: ps2epsi.ps 8726 2008-05-11 17:00:17Z alexcher $
+% $Id: ps2epsi.ps 9619 2009-04-07 10:20:02Z ken $
% Convert an arbitrary PostScript file to an EPSI file.
%
% Please do not contact these users if you have questions. They no longer
@@ -53,7 +54,13 @@ ps2edict begin
% The main procedure
/ps2epsi
- { % Open the file
+ {
+ % bbox written to outfile by bbox device from ps2epsi command file
+ outfile (r) file /epsifile exch def
+ /BBoxString epsifile 256 string readline pop def
+ /HiresBBoxString epsifile 256 string readline pop def
+ epsifile closefile
+ % Open the file
outfile (w) file /epsifile exch def
% Get the device parameters
currentdevice getdeviceprops .dicttomark
@@ -160,18 +167,9 @@ ps2edict begin
dup rm gt
% If the new index is greater, we save index and element
{ /rm exch def } { pop } ifelse
- } {
- pop
- } ifelse
+ } if
} for
- % Calculate the bounding box values.
- % Note that these must be corrected to produce closed-open intervals.
- /llx lm def
- /lly devheight bm sub 1 sub def
- /urx rm 1 add def
- /ury devheight tm sub def
-
% Write out the magic string and bounding box information
epsifile (%!PS-Adobe-2.0 EPSF-1.2\n) writestring
/epsititle where { pop epsifile epsititle writestring } if
@@ -195,11 +193,8 @@ ps2edict begin
epsifile (\n) writestring
epsifile flushfile
- epsifile (%%BoundingBox: ) writestring
- epsifile llx write==only epsifile ( ) writestring
- epsifile lly write==only epsifile ( ) writestring
- epsifile urx write==only epsifile ( ) writestring
- epsifile ury write==
+ epsifile BBoxString writestring epsifile (\r) writestring
+ epsifile HiresBBoxString writestring epsifile (\r) writestring
% Define character and bit widths for the output line buffer:
/cwidth rm lm sub 1 add def