home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 October / Chip_2002-10_cd1.bin / zkuste / pdf / download / gs704w32.exe / gs7.04 / lib / ps2epsi.bat < prev    next >
Encoding:
DOS Batch File  |  2002-01-31  |  748 b   |  29 lines

  1. @echo off 
  2. @rem $Id: ps2epsi.bat,v 1.6 2001/06/22 16:09:22 lpd 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 /InitDictCount countdictstack def gsave save mark newpath >> %outfile%
  16.  
  17. rem Append the original onto the preview header
  18. copy %outfile% + %infile%
  19.  
  20. echo countdictstack InitDictCount sub { end } repeat >> %outfile%
  21. echo cleartomark restore grestore >> %outfile%
  22.  
  23. goto end
  24.  
  25. :usage
  26. echo "Usage: ps2epsi <infile.ps> <outfile.epi>"
  27.  
  28. :end
  29.