home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2002 February / INTERNET88.ISO / pc / software / windows / bits / pdf995 / data1.cab / Program_Executable_Files / res / ps2epsi.bat < prev    next >
Encoding:
DOS Batch File  |  2001-12-08  |  746 b   |  29 lines

  1. @echo off 
  2. @rem $RCSfile: ps2epsi.bat,v $ $Revision: 1.3.2.2 $
  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.