Bookbinding HOWTO Step 1: Printing process
This involves the process of arranging the pages into several booklets and printing them. This might seem stupid, but printing a book is sometimes trivial and sometimes a lot trickier than it looks. You need to print 2 pages in each side of the sheet, and arrange them in a way that results in properly ordered page-numbers once you fold the booklet. I normally work with 5 pages per booklet. More pages is too much once you fold, and less is simply too little. The sewing process is the most time consuming and the more booklets you end up with, the more sewing you’ll have to do.
Typically you’ll be working with a PDF or a PostScript file. I will not discuss Windows programs to print booklets because I don’t use any. I’ve heard of a pseudo-printer driver called FinePrint that manages precisely the booklet printing process, but I haven’t used it and it’s not free, so if you are not willing to use the Linux/*nix programs mentioned bellow you should do some investigation on your own.
Some of the commands discussed here can manage only PDF or PS file, but not both. The ones for PDF are usually front ends for the pdfLatex suite. In any case, you can allways convert from PS to PDF and from PDF to PS, so this shouldn’t be a problem. Be advised though: some conversions from one format to the other can involve a sever loss in legibility, so if there’s a command available for your specific filetype you should stick with that. Another useful thing to have into account is that you can always obtain a PDF file of anything. If you are using Cups you’ve got a really nice pseudo-printer to make PDFs out of anything, so use it!
The margins
I you are using A4 paper-size you are going to end up with an A5-sized book. That is 148 mm × 210 mm, which is fine for a paperback book but you should be careful with the margins in the PDF. Too much wasted space will result in extremely small font-sizes, and even with a perfect eyesight reading such a book can be tiresome.
If your PDF wastes too much space you should trim the pages before you print them. There’s a tool included in pdfjam called pdfjoin. Besides joining pages it can do the trimming part. There’s also a command called pdftrim, but it takes a lot longer to run. I think the reason is that it does some actual resizing.
Normally the margins you should trim will vary and you’ll have to find them out by trial and error. I usually make a smaller PDF to make each test faster. I use pdfnup for this. For example, to make a subset called oud.pdf from a source called in.pdf with pages 40 to 50, I would use:
pdfnup in.pdf --nup 1x1 --pages 40-50 --outfile out.pdf
I tend to get central pages of the book, with some chapter beginning right in the middle of the subset. Normally margins change in those pages, and we don’t want to trim off any written text, do we?
Once you have the correct margins to apply, you just have to use pdfjoin. For example, if you wanted to trim 1cm from the left, 1.3cm from the right, 3.5cm from the top and 4 from the bottom of each page, you would simply use:
pdfjoin in.pdf --trim "1cm 4cm 1.3cm 3.5cm" --outfile out.pdf
The booklets
The booklet would be a group of pages properly aligned for folding. In case you had 1-page booklets, you would have printed pages (4,1) in one side and pages (2,3) in the other. For 2-page booklets that would be, from left to right and front to bottom, [(8,1),(2,7)] on one page and [(6,3) ,(4,5)] on the other. For 3-page booklets….well, you know the drill.
I don’t usually use any tools. My laser printer supports directly printing to booklet format, so I don’t have to rearrange anything. The only thing I have to do is specify how many sheets I want per booklet. Since it’s a cheap printer I have to manually reinsert the pile of sheets once it has finished printing the first side. But that’s about it. Normally I fold groups of five, each with 4 pages printed on them, so my booklets have 20 book-pages each. Take a look at your driver’s options. If it’s a laser printer chances are you’ll be able to do this step directly.
If not, you can always use the psbook command bundled with pstools. You’ll have to convert the file to PostScript first (use pdf2ps). There’s probably a way to do this with pdflatex without taking the intermediate step, but I haven’t had the need to look into it yet. If you need a hand with this just ask.
pstools is an extremely handy collection of tools. There’s also a frontend for these called page-crunch, but I usually stick to the command line.
The result
This step will require advances technical skills: press the print button. ;)
And that would be all. In some cases you’ll have to complete both steps before printing, but if you’re fortunate enough your margins will be fine and your printer will be able to do everything for you automagically. Once you’re done with this step you should end up with a nice stack of sheets ready to fold such as this one.

August 2nd, 2008 at 11:05 pm
Thanks for the information on the pdf tools. I used ps2eps on each page before to cut-out excess margins automatically then a psmerge or something. The problem comes when you have tilted ebooks resulting from ocr-ed pdf files. Each book will have a different bounding box. Doing a manual trim/ crop sometimes cuts-out some pages so careful inspection of each is needed.
August 3rd, 2008 at 5:02 pm
I think pdftrim could do something like that (trimming the margins automatically), but it took so long that it was practically useless with big books. I could have sworn it was part of pdfjam, but I see no trace of it right now. It has been a couple of years since the last time I used pdftrim, so maybe it just vanished from the package (or more likely, it comes in another bundle which I’m incapable of finding right now).