ps2ps.bat 480 B

123456789101112131415161718192021222324
  1. @echo off
  2. @rem $Id: ps2ps.bat,v 1.8 2003/03/20 22:10:30 alexcher Exp $
  3. @rem "Distill" PostScript.
  4. if %1/==/ goto usage
  5. if %2/==/ goto usage
  6. call gssetgs.bat
  7. echo -dNOPAUSE -dSAFER -dBATCH >_.at
  8. :cp
  9. if %3/==/ goto doit
  10. echo %1 >>_.at
  11. shift
  12. goto cp
  13. :doit
  14. rem Watcom C deletes = signs, so use # instead.
  15. %GSC% -q -sDEVICE#pswrite -sOutputFile#%2 @_.at %1
  16. goto end
  17. :usage
  18. echo "Usage: ps2ps [options] input.ps output.ps"
  19. echo " e.g. ps2ps -sPAPERSIZE=a4 input.ps output.ps
  20. :end