Every now and then I have the need to create A4-folded-to-A5 booklets. Where I’ve created the source material in OpenOffice.org it’s quite easy to do at the printing stage. But every now and then I have a PDF that has been produced elsewhere that I would like to print as a booklet. And every time I need to do this I find myself searching for the names of the command-line tools I use, and the syntax for making them work as I would like. So for my own benefit, and for the benefit of anyone who finds this page in future, here are the steps I follow:
1) Ensure that “psutils” is installed on your machine. On a Ubuntu box this package is available via the usual repositories. You also need the “ps2pdf” and “pdf2ps” utilities that are part of Ghostscript, but they are usually installed by default on a Linux box anyway.
2) Use “pdf2ps” to convert your PDF file into a postscript file:
3) Use “psbook” to re-order the pages of the file to make a “signature” (i.e. put the pages in the right order so that when you fold your A4 sheets in half you can read them as a booklet):
psbook myfile.ps myfile_book.ps
4) Use “psnup” to scale the A4 pages to A5 and place them 2-up onto an A4 page. The secret here – and the bit I always forget – is to override psnup’s automatic scaling by forcing it to use a scale of 1:1 (the -s1 part). That said, you should double-check that this is actually what you want to do – sometimes you can get better results by leaving out the “-s1” switch, or by specifying a different scale factor (e.g. “-s0.9” or “-s1.1”):
psnup -s1 -2 myfile_book.ps myfile_booklet.ps
5) Finally you can convert the postscript file back into a PDF, if you need to, for subsequent viewing or printing (the command below will produce a final output file called “myfile_booklet.pdf”):
That’s the step-by-step, which is useful if you need to further manipulate the file in-between steps. If all you want to do is convert an A4 pdf to a booklet version of the same, however, then just use the all-in-one command line, replacing the filenames at the start and end as appropriate:
pdf2ps myfile.pdf - | psbook | psnup -s1 -2 | ps2pdf - myfile_booklet.pdf
 Booklet printing in OpenOffice.org:
In the print dialogue click on the “Properties…” button for the printer and set the page orientation to “Landscape”. Then, back in the print dialogue click on the “Options…” button and check the “Brochure” checkbox. Finally, back in the print dialogue, click “OK” to let the printing begin.
Unless you’ve got a duplexing printer you’ll need to manually flip each page over and feed it back in to print double-sided. Also if you exit the print dialogue and come back into it you’ll find that the “Brochure” option has probably become unchecked, so make sure you verify the state of it before running a second copy.