#!/bin/csh # # convert SFF to PDF # # Syntax: sff2pdf (resolution) set sff=$1 set res=$2 set base=`/usr/bin/basename $sff` /bin/mkdir /tmp/$base /usr/bin/sff2misc -m $sff /tmp/$base/$base foreach pbm (/tmp/$base/$base.???.pbm) set ps="$pbm:r.ps" if ($res == 'fein') then /usr/bin/pbmtopgm 1 1 $pbm | \ /usr/bin/pnmtops -noturn -width 8.0 > $ps else /usr/bin/pbmtopgm 1 1 $pbm | \ /usr/bin/pnmscale -yscale 2 | \ /usr/bin/pnmtops -noturn -width 8.0 > $ps endif end /usr/bin/gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=/tmp/$base.pdf /tmp/$base/$base.???.ps /bin/rm -rf /tmp/$base exit 0