#! /bin/sh -v what="all" rm -f $what.pdf pdftk 0*.pdf 1*.pdf 2*.pdf cat output $what.pdf # rotate even pages 180 degrees for landscape double-sided printing # # pdftk $what.pdf cat 1-endevensouth output .even.pdf # pdftk $what.pdf cat 1-endodd output .odd.pdf # pdftk A=.odd.pdf B=.even.pdf shuffle A B output ${what}_print.pdf # # rm .odd.pdf .even.pdf