home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 August / PCWorld_2000-08_cd.bin / Software / TemaCD / ghostscr / gs601w32.exe / gs6.01 / lib / ps2epsi.bat < prev    next >
DOS Batch File  |  2000-03-09  |  707b  |  27 lines

  1. @echo off 
  2. @rem $Id: ps2epsi.bat,v 1.1 2000/03/09 08:40:40 lpd Exp $
  3. if "%1"=="" goto usage
  4. if "%2"=="" goto usage
  5.  
  6. set infile=%1
  7. set outfile=%2
  8.  
  9. rem Ghostscript uses %outfile% to define the output file
  10. gs -q -dNOPAUSE -sDEVICE=bit -sOutputFile=NUL ps2epsi.ps < %infile%
  11.  
  12. rem We bracket the actual file with a few commands to help encapsulation
  13. echo /InitDictCount countdictstack def gsave save mark newpath > %outfile%
  14.  
  15. rem Append the original onto the preview header
  16. copy %outfile% + %infile%
  17.  
  18. echo countdictstack InitDictCount sub { end } repeat >> %outfile%
  19. echo cleartomark restore grestore >> %outfile%
  20.  
  21. goto end
  22.  
  23. :usage
  24. echo "Usage: ps2epsi <infile.ps> <outfile.epi>"
  25.  
  26. :end
  27.