"Fossies" - the Fresh Open Source Software Archive

Member "gs8.54/lib/ps2epsi.bat" (29 Dec 2005, 831 Bytes) of package /linux/misc/old/ghost/AFPL/gs854/gs854w32.exe:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) MS DOS Batch source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 @echo off 
    2 @rem $Id: ps2epsi.bat 6300 2005-12-28 19:56:24Z giles $
    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