$ cat pringbooklet #!/bin/bash #HTML Input --> HTML 2 PS --> PS 2 PDF --> PDF Output #lpstat -p |awk '{print $2}' if [ $# -lt 2 ] then echo "" echo "Usage: `basename $0` {pdf file} {printer name}" echo "" echo "Available printers: \"$(echo $(lpstat -p |awk '{print $2}' ) )\"" echo "" exit fi FILE=$1 PRINTER=$2 if [ $# -eq 3 ] then COPIES="$3" else COPIES="1" fi if [ ! -e $FILE ]; then echo "Can't find the PDF file $1" exit fi pdftops -level3 $FILE - | ps2ps - - | psbook | psnup -2 -Pa4 | ps2pdf - |\ lp -d $PRINTER -o media=a4 -o sides=two-sided-short-edge -n $COPIES -
Unless otherwise stated, our shows are released under a Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license.
The HPR Website Design is released to the Public Domain.