mkpdfebook.sh (325B)
1 #!/bin/bash 2 3 IN="$1" 4 OUT="$2" 5 DIR="$( cd "$( dirname "$0" )" && pwd )" 6 TEMP=`mktemp` 7 #WIDTH=600 8 #HEIGHT=800 9 WIDTH=450 10 HEIGHT=600 11 pdfcrop --margins "0 0 0 42" "$IN" $TEMP-crop.pdf 12 pdftk $TEMP-crop.pdf output $TEMP-sane.pdf 13 $DIR/crop.pl $TEMP-sane.pdf $TEMP-out.pdf $WIDTH $HEIGHT 14 #pdfmin $TEMP-out.pdf 15 cp $TEMP-out.pdf "$OUT"