Making booklets with psbook and psnup

Phil Jones, January 2004

About this how-to

It took me quite a while to understand how to make booklets using the UNIX commands psbook, psnup, plain paper and an inkjet printer. It's wonderfully simple and elegant - when you know how!

Where to get psbook and psnup

If you are running GNU/Linux, there's a good chance that psbook and psnup are already installed. If not, become root and then run this command:

Debian GNU/Linux

# apt-get install psutils

Red Hat, etc

# rpm -ivh /path-to-binary-RPM-files/psutils*.rpm

Windows

  1. Download cygwin, run the setup.exe program and select "psutils" from the "Publishing" group.
  2. You also need a way to create Postscript files. Luckily, there is a way to do it which is included in Windows. Go into the Printers control panel and add the printer "Apple Colour Laserwriter PS". Then edit the printer properties, and click the Details tab. Under "Print to the following port:" select "FILE: (Create a file on disk)". Click OK, then rename the printer "Print to file (Postscript)".

Assumptions

I assume you know how to start a UNIX command shell and navigate within in it.

How booklet printing works

To understand how to put booklets together, let's look at how to make a simple four page A5 booklet.

Step 1: Start off with a Postscript file containing four pages. For an A5 size booklet, the pages need to be A4 size.

 ---------      ---------      ---------     ---------
| | | | | | | |
| | | | | | | |
| 1 | | 2 | | 3 | | 4 |
| | | | | | | |
| | | | | | | |
--------- --------- --------- ---------

Step 3: Put pages one and four together to make the front and back. Put pages two and three together to make the centre spread.

 --------- ---------      --------- ---------
| | | | | |
| | | | | |
| 4 | 1 | | 2 | 3 |
| | | | | |
| | | | | |
--------- --------- --------- ---------

Step 4: Place two-up A4 paper and rotate anticlockwise to landscape orientation.

 ---------      --------- 
| | | |
| 1 | | 3 |
|---------| |---------|
| 4 | | 2 |
| | | |
--------- ---------


Step 5: Print on both sides of one sheet of A4 paper.

Step 6: Turn clockwise.


---------------
| | |
| 4 | 1 |
| | |
| | |
---------------


Step 7: Fold page 4 behind page 1.


/|
/ |
--------
| |
| 1 |
| |
| |
-------


Hey presto, you have a four page, two leaf booklet.


/ \
/ \
/ \
/ \
/ 2 ----------
\ / /
\ / /
\ / 3 /
\ / /
\/__________/

Booklet printing

Luckily, the magical psbook and psnup commands make this transformation easy. To make a A5 booklet out of a four page A4 document:
  1. Create a Postscript file from your document. Select Print in your application and then choose "Print to file (Postscript)" or "Print to file". You will be prompted for a file name, enter "print.ps".
  2. Arrange "print.ps" into book order:
    $ psbook print.ps out.ps
  3. Put the pages two to a page in landscape orientation:
    $ psnup -la4 -2 out.ps > out2up.ps
  4. The result is the output file "out2up.ps". You can then view the output using gv or kghostview, and send it to your printer using lpr.
  5. If you have Ghostscript installed then you can convert the result into Adobe Portable Document Format (PDF):
    $ ps2pdf out2up.ps

A longer example

Suppose you have an 8 page A4 document. After running psbook and psnup and printing the result, you get two sheets. Fold them to A5.

    / \
/ \
/ \
/ \
/ 4 ----------
\ / /
\ / /
\ / 5 /
\ / /
\/__________/


 / \
/ \
/ \
/ \
/ 2 ----------
\ / /
\ / /
\ / 7 /
\ / /
\/__________/


Put the first inside the second and you have an 8 page booklet.


/\ /
/ \ /
/ \ /
/ \ /
-/ \/----------
/ \ 4 / /
/ \ / /
/ \ / /
/ 2 \ / 7 /
/__________\/__________/

Long books

Long books may be made out of batches, where each batch is 4 pages long or some multiple of 4, such as 12, 16, 20, 24, 26 or 30 pages. This is called the signature. The size of the signature depends upon the book and the paper that it's printed on.

For example, if a book has a signature of 16 and it is 160 pages long, it made out of ten bundles of 16 pages. Look carefully at the spine of a book with "perfect binding" such as a dictionary and you should see this pattern in action.

To prepare the input file "print.ps" with a signature of 16, specify the 16 as the signature using the -s option. For example:
$ psbook -s16 print.ps out.ps
$ psnup -la4 -2 out.ps > out2up.ps

See also