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
|
Rev | Line | |
---|
[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 |
|
---|
| 11 | parse arg params
|
---|
| 12 |
|
---|
| 13 | gs='@gsos2'
|
---|
| 14 | inext='.ps'
|
---|
| 15 | outext='.pdf'
|
---|
| 16 |
|
---|
| 17 | if params='' then call usage
|
---|
| 18 |
|
---|
| 19 | options=''
|
---|
| 20 |
|
---|
| 21 | /* extract options from command line */
|
---|
| 22 | i=1
|
---|
| 23 | param=word(params,i)
|
---|
| 24 | do while substr(param,1,1)='-'
|
---|
| 25 | options=options param
|
---|
| 26 | i=i+1
|
---|
| 27 | param=word(params,i)
|
---|
| 28 | end
|
---|
| 29 |
|
---|
| 30 | infile=param
|
---|
| 31 | if infile='' then call usage
|
---|
| 32 | outfile=word(params,i+1)
|
---|
| 33 | if outfile='' then do
|
---|
| 34 | outfile=infile''outext
|
---|
| 35 | infile=infile''inext
|
---|
| 36 | end
|
---|
| 37 |
|
---|
| 38 | gs options '-q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile='outfile options '-c save pop -f' infile
|
---|
| 39 | exit
|
---|
| 40 |
|
---|
| 41 | usage:
|
---|
| 42 | say 'Usage: ps2pdf [options...] input[.ps output.pdf]'
|
---|
| 43 | exit
|
---|
Note:
See
TracBrowser
for help on using the repository browser.