segunda-feira, 14 de junho de 2010

Create your own booklets



Here is a easy way to create your own booklets and print'em... easy and fast.
You just have to put the paper, run the script, and change the paper when asked to.
(*note: there is no need to reorder the pages... the script does it automatically)

Here is a script to do it all:

#!/bin/bash
file=$1
pdf2ps $file /tmp/${file%%.pdf}.ps
psbook /tmp/${file%%.pdf}.ps /tmp/out.ps
psnup -2 /tmp/out.ps /tmp/out2up.ps
ps2pdf /tmp/out2up.ps ${file%%.pdf}-booklet.pdf
echo Do you want to print the booklet now? \(y\)es or \(n\)no:
read PRINT
if [ "$PRINT" = "y" ]; then
lp -o page-set=odd ${file%%.pdf}-booklet.pdf
echo change paper now! \(no need to reorder pages\)
read PRINT
lp -o page-set=even -o outputorder=reverse ${file%%.pdf}-booklet.pdf
fi


you may download it here.

Nenhum comentário:

Postar um comentário