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

  1. /* $Id: ps2epsi.cmd,v 1.3 2001/06/22 16:09:22 lpd Exp $ */
  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.