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.cmd < prev    next >
Encoding:
Text File  |  2001-12-08  |  866 b   |  32 lines

  1. /* $RCSfile: ps2epsi.cmd,v $ $Revision: 1.1.2.2 $ */
  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 /InitDictCount countdictstack def gsave save mark newpath >> %outfile%
  19.  
  20. rem Append the original onto the preview header
  21. copy %outfile% + %infile%
  22.  
  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
  32.