Un semplice script per generare file PDF da file DVI
Il seguente comando è stato costruito sulla
base delle informazioni prelevate nella
seguente pagina.
#!/bin/sh
if [ -z "$1" ]; then
echo usage: $0 {file}
exit
fi
BASE=${1%.dvi}
ANSWERF=`file $BASE.dvi -b | cut -d \ -f 2`
if [ "$ANSWERF" = "DVI" ];
then
echo "Generating postscript..."
dvips -Ppdf -GO $BASE.dvi -o
echo "Generating pdf..."
ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCompabilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true $BASE.ps
rm $BASE.ps
fi
|