2 # pdf2ps [gs-options] [input.pdf] [output.ps] - generate PS from PDF
7 echo 'usage: pdf2ps [gs-options] [input.pdf] [output.ps]' >[1=2]
11 lang=(-'dLanguageLevel=2')
13 while(! ~ $#* 0 && ~ $1 -* && ! ~ $1 - --){
14 if(~ $1 '-dLanguageLevel='*)
37 # fin=/tmp/pdf2ps.$pid.^`{date -n}
38 # fn cleanup { rm -f $fin }
45 # Doing an inital `save' helps keep fonts from being flushed between
46 # pages. We have to include the options twice because -I only takes
47 # effect if it appears before other options.
49 gs $opt -dSAFER -dNOPAUSE -dBATCH -q -s'DEVICE=pswrite' \
51 -s'OutputFile='$fout -c save pop -f $fin