source: other-projects/trunk/winbin/bin/ghostscript/lib/ps2pdfxx.bat@ 17223

Last change on this file since 17223 was 17223, checked in by max, 16 years ago

Add Ghostscript binaries and libraries for windows.

File size: 1.3 KB
Line 
1@echo off
2@rem $Id: ps2pdfxx.bat 8547 2008-02-25 16:10:43Z alexcher $
3rem Internal batch file for calling pdfwrite driver.
4
5rem The files that call this one (ps2pdf*.bat) write the command-line
6rem options into _.at, and then pass the last 2 (or fewer) arguments
7rem to this file.
8
9call gssetgs.bat
10echo -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE#pdfwrite >_.at2
11
12if "%OS%"=="Windows_NT" goto nt
13
14rem Run ps2pdf on any Microsoft OS.
15
16if %1/==/ goto usage
17if %2/==/ goto usage
18
19rem Watcom C deletes = signs, so use # instead.
20rem We have to include the options twice because -I only takes effect if it
21rem appears before other options.
22
23:run
24echo -sOutputFile#%2 >>_.at2
25copy /b /y _.at2+_.at >NUL
26echo -c .setpdfwrite -f%1 >>_.at2
27%GSC% @_.at @_.at2
28goto end
29
30:usage
31echo Usage: ps2pdf [options...] input.[e]ps output.pdf
32goto end
33
34rem Run ps2pdf on Windows NT.
35
36:nt
37if not CMDEXTVERSION 1 goto run
38if %1/==/ goto ntusage
39if %2/==/ goto nooutfile
40goto run
41
42:ntusage
43echo Usage: ps2pdf input.ps [output.pdf]
44echo or: ps2pdf [options...] input.[e]ps output.pdf
45goto end
46
47:nooutfile
48rem We don't know why the circumlocution with _1 is needed....
49set _1=%1
50set _outf=%_1:.PS=.pdf%
51if %_1%==%_outf% goto addsuff
52call ps2pdfxx %1 %_outf%
53goto postsuff
54
55:addsuff
56call ps2pdfxx %1 %1%.pdf
57
58:postsuff
59set _1=
60set _outf=
61
62:end
63rem Clean up.
64if exist _.at erase _.at
65if exist _.at2 erase _.at2
Note: See TracBrowser for help on using the repository browser.