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.
|
|
@echo offrem Internal batch file for calling pdfwrite driver.
rem The files that call this one (ps2pdf*.bat) write the command-linerem options into _.at, and then pass the last 2 (or fewer) argumentsrem to this file.
call "%~dp0gssetgs.bat"echo -q -P- -dSAFER -dNOPAUSE -dBATCH -sDEVICE#pdfwrite >"%TEMP%\_.at"2
if "%OS%"=="Windows_NT" goto nt
rem Run ps2pdf on any Microsoft OS.
if %1/==/ goto usageif %2/==/ goto usage
rem Watcom C deletes = signs, so use # instead.rem We have to include the options twice because -I only takes effect if itrem appears before other options.
:runecho -sOutputFile#%2 >>"%TEMP%\_.at"2copy /b /y "%TEMP%\_.at"2+"%TEMP%\_.at" "%TEMP%\_.at"2 >NULecho %1 >>"%TEMP%\_.at"2%GSC% @"%TEMP%\_.at" @"%TEMP%\_.at"2goto end
:usageecho Usage: ps2pdf [options...] input.[e]ps output.pdfgoto end
rem Run ps2pdf on Windows NT.
:ntif not CMDEXTVERSION 1 goto runif %1/==/ goto ntusageif %2/==/ goto nooutfilegoto run
:ntusageecho Usage: ps2pdf input.ps [output.pdf]echo or: ps2pdf [options...] input.[e]ps output.pdfgoto end
:nooutfilerem We don't know why the circumlocution with _1 is needed....set _1=%1set _outf=%_1:.PS=.pdf%if %_1%==%_outf% goto addsuffcall "%~dp0ps2pdfxx" %1 %_outf%goto postsuff
:addsuffcall "%~dp0ps2pdfxx" %1 %1%.pdf
:postsuffset _1=set _outf=
:endrem Clean up.if exist "%TEMP%\_.at" erase "%TEMP%\_.at"if exist "%TEMP%\_.at"2 erase "%TEMP%\_.at"2
|