Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Rearranging a PDF

20180528 To rearrange a pdf to take the original pages, fit them two per page, targetting double sided printing, to create a booklet that is bound in the middle of each folded sheet, the command pdfjam and in particular its front-end pdfbook will be useful.

  $ pdfbook input.pdf
  $ evince input-book.pdf
Viewing the resulting pdf document we will see the first page is landscape with two original pages on this single page, upside down. These are the first and the very last page from that original document. The very last page will be blank if the number of pages in the original pdf is not a multiple of 4, as in Figure 66.2. The second page will be upright and will be the second page of the original document and the second to last page of the original document. And so on. When printed all of the pages will come out the right way up.

Figure 66.2: A rearranged pdf document for booklet printing.
Image pdfbook-output

The pdfbook command will generate some informative output and in particular will indicate the equivalent pdfjam command that is effectively run to generate the output:

[basicstyle=\tiny]
  $ pdfjam --booklet 'true' --landscape --suffix book --signature '4' -- input.pdf -

Copyright © Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
Graham Williams is the developer of open source software including rattle and wajig.
He is the author of Data Mining with Rattle and Essentials of Data Science.
This web site is hosted by Togaware, free and open source software since 1984.