|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- @echo off
-
-
-
-
-
-
- call gssetgs.bat
- echo -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE#pdfwrite >_.at2
-
- if "%OS%"=="Windows_NT" goto nt
-
-
- if %1/==/ goto usage
- if %2/==/ goto usage
-
-
-
-
- :run
- echo -sOutputFile#%2 >>_.at2
- copy /b /y _.at2+_.at >NUL
- echo -c .setpdfwrite -f%1 >>_.at2
- %GSC% @_.at @_.at2
- goto end
-
- :usage
- echo Usage: ps2pdf [options...] input.[e]ps output.pdf
- goto end
-
-
- :nt
- if not CMDEXTVERSION 1 goto run
- if %1/==/ goto ntusage
- if %2/==/ goto nooutfile
- goto run
-
- :ntusage
- echo Usage: ps2pdf input.ps [output.pdf]
- echo or: ps2pdf [options...] input.[e]ps output.pdf
- goto end
-
- :nooutfile
-
- set _1=%1
- set _outf=%_1:.PS=.pdf%
- if %_1%==%_outf% goto addsuff
- call ps2pdfxx %1 %_outf%
- goto postsuff
-
- :addsuff
- call ps2pdfxx %1 %1%.pdf
-
- :postsuff
- set _1=
- set _outf=
-
- :end
-
- if exist _.at erase _.at
- if exist _.at2 erase _.at2
|