星火微课系统客户端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

ps2epsi.bat 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. @echo off
  2. @rem $Id: ps2epsi.bat 9619 2009-04-07 10:20:02Z ken $
  3. if %1/==/ goto usage
  4. if %2/==/ goto usage
  5. call gssetgs.bat
  6. set infile=%1
  7. set outfile=%2
  8. rem First we need to determine the bounding box. ps2epsi.ps below will pick
  9. rem the result up from %outfile%
  10. %GSC% -q -dNOPAUSE -dBATCH -dSAFER -dDELAYSAFER -sDEVICE=bbox -sOutputFile=NUL %infile% 2> %outfile%
  11. rem Ghostscript uses %outfile% to define the output file
  12. %GSC% -q -dNOPAUSE -dSAFER -dDELAYSAFER -sDEVICE=bit -sOutputFile=NUL ps2epsi.ps < %infile%
  13. rem We bracket the actual file with a few commands to help encapsulation
  14. echo %%%%Page: 1 1 >> %outfile%
  15. echo %%%%BeginDocument: %outfile% >> %outfile%
  16. echo /InitDictCount countdictstack def gsave save mark newpath >> %outfile%
  17. echo userdict /setpagedevice /pop load put >> %outfile%
  18. rem Append the original onto the preview header
  19. rem cat.ps uses the %infile% and %outfile% environment variables for the filenames
  20. %GSC% -q -dNOPAUSE -dBATCH -dSAFER -dDELAYSAFER -sDEVICE=bit -sOutputFile=NUL cat.ps
  21. echo %%%%EndDocument >> %outfile%
  22. echo countdictstack InitDictCount sub { end } repeat >> %outfile%
  23. echo cleartomark restore grestore >> %outfile%
  24. goto end
  25. :usage
  26. echo "Usage: ps2epsi <infile.ps> <outfile.epi>"
  27. :end