You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
501 B

1 month ago
  1. @echo off
  2. @rem "Distill" PostScript.
  3. if %1/==/ goto usage
  4. if %2/==/ goto usage
  5. call "%~dp0gssetgs.bat"
  6. echo -dNOPAUSE -P- -dSAFER -dBATCH >"%TEMP%\_.at"
  7. :cp
  8. if %3/==/ goto doit
  9. echo %1 >>"%TEMP%\_.at"
  10. shift
  11. goto cp
  12. :doit
  13. rem Watcom C deletes = signs, so use # instead.
  14. %GSC% -q -sDEVICE#ps2write -sOutputFile#%2 @"%TEMP%\_.at" %1
  15. if exist "%TEMP%\_.at" erase "%TEMP%\_.at"
  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