# How to Create a Booklet From a Pdf

I wanted to print a booklet of a Lego instruction pdf.

## First attempt, with pdfbook2

Fortunately, there exists something out of the box: pdfbook2.

From debian testing, you can download pdfbook2 with :

sudo apt install texlive-extra-utils


The man says

pdfbook2 - transform pdf files into booklets for double-sided printing.

Great, then running :

pdfbook2 --paper=a4paper --short-edge --no-crop 6263351.pdf


Note the short-edge option because the printer is configured for two-sided short-edge printing.

Also, for some reason, cropping is enabled with the --no-crop option…

I got something usable.

See how the last page is aside the first page. By printing all the pages in two-sided mode, you can put all the sheets together, fold them and get your booklet.

But, as you can see, a lot of space was unused.

## Second attempt, with pdfnup/pdfxup

Then, I learned on the Internet about pdfnup supposedly allowing to transform a pdf putting using a grid layout. Unfortunately, pdfnup appears not to be in texlive anymore, but pdfxup is.

The man page says

pdfxup creates a PDF document where each page is obtained by combining several pages of a PDF file given as output. The important feature of pdfxup, compared to similar programs, is that it tries to compute the (global) bounding box of the input PDF file, in order to remove the margins and to keep the text only. Instead of having the font size di‐ vided by 2 (for the case of 2-up output), in some case you may end up with almost the same font size as in the original document (as is the case for a default ‘article’ document produced by LaTeX).

Great, let’s try it.

By tweaking a bit the options to remove frames and borders, I run.

pdfxup -x 1 -y 2 -l -fw 0 -im 0 6263351.pdf


This gives me a pdf with each sheet having two pages.

Great, but there are still border to get rid of before creating the booklet.

Fortunately, pdfcrop comes to the rescue.

pdfcrop pdfxup.pdf


Nice, then let’s try to put this into pdfbook2 now.

pdfbook2 --paper a4paper --short-edge --no-crop pdfxup-crop.pdf


Great, now I can print this on A4 sheets and, with pretty few unused space, I can create my booklet.