source: other-projects/trunk/winbin/bin/ghostscript/lib/ps2pdf.cmd@ 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: 953 bytes
RevLine 
[17223]1/* $Id: ps2pdf.cmd 8244 2007-09-18 19:01:34Z giles $ */
2/*
3 * This file is maintained by a user: if you have any questions about it,
4 * please contact Mark Hale ([email protected]).
5 */
6
7/* Convert PostScript to PDF 1.4 (Acrobat 5-and-later compatible). */
8/* The PDF compatibility level may change in the future: */
9/* use ps2pdf12 or ps2pdf13 if you want a specific level. */
10
11parse arg params
12
13gs='@gsos2'
14inext='.ps'
15outext='.pdf'
16
17if params='' then call usage
18
19options=''
20
21/* extract options from command line */
22i=1
23param=word(params,i)
24do while substr(param,1,1)='-'
25 options=options param
26 i=i+1
27 param=word(params,i)
28end
29
30infile=param
31if infile='' then call usage
32outfile=word(params,i+1)
33if outfile='' then do
34 outfile=infile''outext
35 infile=infile''inext
36end
37
38gs options '-q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile='outfile options '-c save pop -f' infile
39exit
40
41usage:
42say 'Usage: ps2pdf [options...] input[.ps output.pdf]'
43exit
Note: See TracBrowser for help on using the repository browser.