Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
@echo off 
2
@rem $Id: ps2epsi.bat,v 1.9 2002/04/25 21:29:08 ghostgum Exp $
3
 
4
if %1/==/ goto usage
5
if %2/==/ goto usage
6
 
7
call gssetgs.bat
8
set infile=%1
9
set outfile=%2
10
 
11
rem Ghostscript uses %outfile% to define the output file
12
%GSC% -q -dNOPAUSE -dSAFER -dDELAYSAFER -sDEVICE=bit -sOutputFile=NUL ps2epsi.ps < %infile%
13
 
14
rem We bracket the actual file with a few commands to help encapsulation
15
echo %%%%Page: 1 1 >> %outfile%
16
echo %%%%BeginDocument: %outfile% >> %outfile%
17
echo /InitDictCount countdictstack def gsave save mark newpath >> %outfile%
18
 
19
rem Append the original onto the preview header
20
copy %outfile% + %infile%
21
 
22
echo %%%%EndDocument >> %outfile%
23
echo countdictstack InitDictCount sub { end } repeat >> %outfile%
24
echo cleartomark restore grestore >> %outfile%
25
 
26
goto end
27
 
28
:usage
29
echo "Usage: ps2epsi <infile.ps> <outfile.epi>"
30
 
31
:end