Thu, 02 Sep 2004

How To Print a Book From Postscript

Here's how to print some documentation as a book. The goal was to print two pages per sheet double sided without having the luxury of a printer that supports duplex printing.

In this example, I'm printing about 50 pages (Chapter 5) from the sendmail documentation.

psselect -p34-85 op.ps | psbook | psnup -2 | pstops 2:-0 | lpr

So we use psselect to pick the pages we want to print. Then, we use psbook to rearrange the pages so they end up in the right order in the finished booklet. The psnup utility is used to to print two pages per sheet, and finally, pstops selects just the odd pages in reverse order.

In the second step, you feed the pages back through your printer using the manual feeder. On my printer, a LaserJet 1200, the manual feeder pulls page from the top, the same as the tray. That is why I used pstops to rearrange the pages. If your manual feed pulls from the bottom, you can print the odd pages in the normal order.

psselect -p34-85 op.ps | psbook | psnup -2 | psselect -o | lpr

Now, we just put the pages in the manual feeder and print the even pages.

psselect -p34-85 op.ps | psbook | psnup -2 | psselect -e | lpr

P.S (Ha!) I think pstops can do everything that psselect, psbook, and psnup do, but I didn't bother learning the syntax.

tech | Permanent Link

The state is that great fiction by which everyone tries to live at the expense of everyone else. - Frederic Bastiat