home *** CD-ROM | disk | FTP | other *** search
/ HTML - Publishing on the Internet / html_cdrom.iso / tools / grafik / win95 / gscript / ps2epsi.bat < prev    next >
Encoding:
DOS Batch File  |  1993-03-06  |  681 b   |  51 lines

  1. @echo off 
  2.  
  3. if "%1"=="" goto usage
  4.  
  5. if "%2"=="" goto usage
  6.  
  7.  
  8.  
  9. set infile=%1
  10.  
  11. set outfile=%2
  12.  
  13.  
  14.  
  15. rem Ghostscript uses %outfile% to define the output file
  16.  
  17. gs -q -dNOPAUSE -dNODISPLAY ps2epsi.ps < %infile%
  18.  
  19.  
  20.  
  21. rem We bracket the actual file with a few commands to help encapsulation
  22.  
  23. echo /InitDictCount countdictstack def gsave save mark newpath >> %outfile%
  24.  
  25.  
  26.  
  27. rem Append the original onto the preview header
  28.  
  29. copy %outfile% + %infile%
  30.  
  31.  
  32.  
  33. echo countdictstack InitDictCount sub { end } repeat >> %outfile%
  34.  
  35. echo cleartomark restore grestore >> %outfile%
  36.  
  37.  
  38.  
  39. goto end
  40.  
  41.  
  42.  
  43. :usage
  44.  
  45. echo "Usage: ps2epsi <infile.ps> <outfile.epi>"
  46.  
  47.  
  48.  
  49. :end
  50.  
  51.