ghostscript

A5 booklet/brochure on Linux

First you have a normal PDF with A4 pages. Something you printed from wikipedia but using ‘to pdf’ option. Now you want to print it at half size, well A5, but in order to use duplex and everything, pages have to be rotated and rearranged. On Linux command-line this is easy using ‘ghost-script’ tools.

pdf2ps

convert your pdf to post-script:

$ pdf2ps input.pdf output.ps

ps2ps

the main fun is here:

$ pstops -pa4 "4:1R@0.7(0,1h)+2R@0.7(0,0.5h),0R@0.7(0,0.5h)+3R@0.7(0,1h)" mozilla.ps booklet.ps

ps2pdf

convert resulting post-script back to pdf:

$ gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -sOutputFile=booklet.pdf -dAutoRotatePages=/None booklet.ps

Print the resulting file with duplex option with short-edge. You will end up with foldable pages that don’t go one into another. Fold them and stack them on top of each other and bind them with stapler or thread.