diff options
Diffstat (limited to 'lib/ps2ps2.bat')
-rwxr-xr-x | lib/ps2ps2.bat | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/ps2ps2.bat b/lib/ps2ps2.bat new file mode 100755 index 00000000..c31924f5 --- /dev/null +++ b/lib/ps2ps2.bat @@ -0,0 +1,24 @@ +@echo off +@rem Converting Postscript 3 or PDF into PostScript 2. + +if %1/==/ goto usage +if %2/==/ goto usage +call "%~dp0gssetgs.bat" +echo -dNOPAUSE -P- -dSAFER -dBATCH >"%TEMP%\_.at" +:cp +if %3/==/ goto doit +echo %1 >>"%TEMP%\_.at" +shift +goto cp + +:doit +rem Watcom C deletes = signs, so use # instead. +%GSC% -q -sDEVICE#ps2write -sOutputFile#%2 @"%TEMP%\_.at" %1 +if exist "%TEMP%\_.at" erase "%TEMP%\_.at" +goto end + +:usage +echo "Usage: ps2ps [options] input.ps output.ps" +echo " e.g. ps2ps -sPAPERSIZE=a4 input.ps output.ps + +:end |