diff options
Diffstat (limited to 'lib/ps2epsi.cmd')
-rwxr-xr-x | lib/ps2epsi.cmd | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/lib/ps2epsi.cmd b/lib/ps2epsi.cmd index 9eafdbd8..c87d82e6 100755 --- a/lib/ps2epsi.cmd +++ b/lib/ps2epsi.cmd @@ -1,8 +1,3 @@ -/* - * This file is maintained by a user: if you have any questions about it, - * please contact Mark Hale (mark.hale@physics.org). - */ - @echo off if %1/==/ goto usage if %2/==/ goto usage @@ -10,25 +5,8 @@ if %2/==/ goto usage set infile=%1 set outfile=%2 -rem First we need to determine the bounding box. ps2epsi.ps below will pick -rem the result up from %outfile% -gsos2 -q -dNOPAUSE -dBATCH -P- -sDEVICE=bbox -sOutputFile=NUL %infile% 2> %outfile% - -rem Ghostscript uses %outfile% to define the output file -gsos2 -q -dNOPAUSE -P- -sDEVICE=bit -sOutputFile=NUL ps2epsi.ps < %infile% - -rem We bracket the actual file with a few commands to help encapsulation -echo %%%%Page: 1 1 >> %outfile% -echo %%%%BeginDocument: %outfile% >> %outfile% -echo /InitDictCount countdictstack def gsave save mark newpath >> %outfile% -echo userdict /setpagedevice /pop load put >> %outfile% - -rem Append the original onto the preview header -copy %outfile% + %infile% - -echo %%%%EndDocument >> %outfile% -echo countdictstack InitDictCount sub { end } repeat >> %outfile% -echo cleartomark restore grestore >> %outfile% +rem Now convert the input to EPSF and add the Preview to the EPSF file +gsos2 -q -dNOOUTERSAVE -dNODISPLAY -dLastPage=1 -sOutputFile=%outfile% --permit-file-read=%infile% %~dp0ps2epsi.ps %infile% goto end |