1@echo off 2@rem "Distill" PostScript. 3 4if %1/==/ goto usage 5if %2/==/ goto usage 6call "%~dp0gssetgs.bat" 7echo -dNOPAUSE -P- -dSAFER -dBATCH >"%TEMP%\_.at" 8:cp 9if %3/==/ goto doit 10echo %1 >>"%TEMP%\_.at" 11shift 12goto cp 13 14:doit 15rem Watcom C deletes = signs, so use # instead. 16%GSC% -q -sDEVICE#ps2write -sOutputFile#%2 @"%TEMP%\_.at" %1 17if exist "%TEMP%\_.at" erase "%TEMP%\_.at" 18goto end 19 20:usage 21echo "Usage: ps2ps [options] input.ps output.ps" 22echo " e.g. ps2ps -sPAPERSIZE=a4 input.ps output.ps 23 24:end 25