Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
/* $Id: ps2pdf.cmd,v 1.4 2005/08/31 18:31:01 igor Exp $ */
2
/*
3
 * This file is maintained by a user: if you have any questions about it,
4
 * please contact Mark Hale (mark.hale@physics.org).
5
 */
6
 
7
/* Convert PostScript to PDF 1.4 (Acrobat 4-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