2 # ps2pdf - convert PostScript to PDF
6 echo 'usage: ps2pdf [gs-options] [input.ps [output.pdf]]' >[1=2]
10 # gs's pdfwrite sometimes emits bad pdf at level 1.2,
11 # but 1.4 seems to work fine.
12 compat=(-'dCompatibilityLevel=1.2')
14 while(! ~ $#* 0 && ~ $1 -* && ! ~ $1 - --){
15 if(~ $1 '-dCompatibilityLevel='*)
37 # We have to include the options twice because -I only takes effect
38 # if it appears before other options.
40 gscmd=( gs $opt -dSAFER -dNOPAUSE -dBATCH -q -s'DEVICE=pdfwrite' \
42 -s'OutputFile='$fout -c .setpdfwrite -f $fin)