Subversion Repositories planix.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
/* $Id: ps2epsi.cmd,v 1.6 2002/04/25 21:29:08 ghostgum Exp $ */
2
/*
3
 * This file is maintained by a user: if you have any questions about it,
4
 * please contact Mark Hale (mark.hale@physics.org).
5
 */
6
 
7
@echo off
8
if %1/==/ goto usage
9
if %2/==/ goto usage
10
 
11
set infile=%1
12
set outfile=%2
13
 
14
rem Ghostscript uses %outfile% to define the output file
15
gsos2 -q -dNOPAUSE -dSAFER -dDELAYSAFER -sDEVICE=bit -sOutputFile=NUL ps2epsi.ps < %infile%
16
 
17
rem We bracket the actual file with a few commands to help encapsulation
18
echo %%%%Page: 1 1 >> %outfile%
19
echo %%%%BeginDocument: %outfile% >> %outfile%
20
echo /InitDictCount countdictstack def gsave save mark newpath >> %outfile%
21
 
22
rem Append the original onto the preview header
23
copy %outfile% + %infile%
24
 
25
echo %%%%EndDocument >> %outfile%
26
echo countdictstack InitDictCount sub { end } repeat >> %outfile%
27
echo cleartomark restore grestore >> %outfile%
28
 
29
goto end
30
 
31
:usage
32
echo "Usage: ps2epsi <infile.ps> <outfile.epi>"
33
 
34
:end