Is there a Linux or web-based tool to sort pages of a PDF document so I can print a book from it?

In this case, I have an A5-format PDF that I want to print on A4 pages, like this:

 ___________              ___________
|           |            |           |
| 99     1  | other side |  2     98 |
|___________|            |___________|
|           |
| 97     3  | ... and so on
  • 1
    I would think that you could print a normal PDF, and set your page layout to be that of a book. But then, I hate printers, so I'm no expert on this.
    – dotVezz
    Feb 5, 2014 at 20:57
  • Doing it manually could be done with the default "Preview" app on Mac, but would be extremely tedious. I expect that Linux or Windows would be just as tedious. I once wrote an app to do this for Postscript, so I suppose you could use pdf2ps, then my app, then ps2pdf. Unfortunately, I can't find my app at the moment. Edit: it looks like psbook does the same thing as my app. Aug 25, 2023 at 22:42

6 Answers 6


I am going to second the psbook recommendations but add this as a separate answer to note some of the complexities and what would be lost in what you are doing. Chances are this is not a problem (I assume you are trying to print the book, not click on pages with a mouse) but basically this limits you to the PDF features available in Postscript (no hyperlinks etc) and to note one possible alternative (depending on what exactly you are trying to do).

In general, the printing of signaitures is somewhat complicated. You don't have 1, 99, 2, 98, 3, 97 etc. Instead you have 1, 2, 99, 98, 3, 4, 97, 96 (or 1, 99, 2, 3, 98, 97 if starting on the other page) if you are only printing double sheets two sided. Additionally you have the issue that this assumes you aren't folding and cutting signatures (only folding them). It looks like psbook only handles the fold and bind method, not the fold, cut, and bind method (with fold/cut/bind, chances are you'd print on A0 paper, 32 sheets to a signature, then cut and fold, so one sheet would become one signature).

There aren't any tools specifically for this that I know of directly in pdf format.

One thing to keep in mind is that if you are generating PDF's yourself from LaTeX, the following is likely to be more flexible and helpful: booklet.sty

That gives you a much richer set of options for printing signatures.


On the command line

You can use Pdfjam. This is a front-end for PDFLaTeX, so you need a LaTeX installation. This isn't difficult to install on Linux (just let your package manager pull in the dependencies), but it will cost a few hundred MB of storage. The command is:

pdfbook foo.pdf

with the output going to foo-book.pdf, or pdfbook --output book.pdf foo.pdf if you want to control the output file name.

With older versions of Pdfjam (before 2.06), you need an additional option:

pdfbook --booklet true foo.pdf

With a GUI

This doesn't seem to be commonly available as a pre-configured printing option. There is a wishlist item in Okular. You can create a printing filter in KDE. For Gnome, the official advice is to list the page order manually!

You can install PdfBooklet. It isn't officially supported on Linux, and I haven't tried; however, it's a Python script, so it should work (install the pyPdf library through your package manager).

Acrobat Reader has booklet printing in its print options, under “Page Handling”.


As noted in the comments, it might well be the printer driver handles that: watch out for an option like "booklet".

Apart from that, you might be able to combine several command line utilities, which are part of the Ghostscript package (at least on Ubuntu):

  • pdf2ps converts your PDF into the PostScript format
  • psbook does the job you've asked for (rearrange pages in PostScript file into signatures)
  • ps2pdf converts the PS back to PDF

From the psbook man page:

Psbook rearranges pages from a PostScript document into ``signatures'' for printing books or booklets, creating a new PostScript file. The input PostScript file should follow the Adobe Document Structuring Conventions.

  • I am a bit expecting psbook to also put the pages side by side (making it complete foolproof), but I found that psbook shuffles the order of the pages only.
    – Bernhard
    Feb 6, 2014 at 6:47
  • @Bernhard, what you are looking for is psnup.
    – hildred
    Apr 1, 2020 at 7:02

The following little tool written in Java worked just perfectly: http://quantumelephant.co.uk/bookbinder/bookbinder.html

Bookbinder is a program that will convert a PDF document into signatures suitable for traditional bookbinding.
While there are a lot of programs on the net that will create a single booklet from a small document, I couldn't find one that would turn a 500 page novel or textbook into several signatures. So I had to write one.
The chosen PDF is split into chunks, the page order of each chunk is rearranged, then the pages are placed two to a page in a new PDF. After printing and folding, each bundle of sheets should be a correctly ordered signature, ready for binding.

enter image description here

enter image description here

The program is released under the same license as itext, a mixture of Mozilla Public License and GNU Library General Public License.


Among other utilities I found this software, Print House PDF Sorter here.

A Software to Assist Putting Pages of a PDF Document into Print-house Order for Printing as a Book. This software can arrange pages of a PDF document sorted in way to come as sheets of a book ready to be stapled at the middle.

Pages should be in A4 standard portrait size (please resize and put in portrait form using this page PDF Merger R6 resizing feature) and result will come as an A4 landscape accommodating each two pages in one sheet.

There are four schemes for the second sheets depending on the technology of your printer or your desired manual feed. Select scheme by testing your printer with couple of sheets.

enter image description here

This software as I tried does not read PDFs secured by passwords

One of the schemes is like this,

enter image description here

The software is free, need notpay anything and should be cross platform.


PdfCpu works great:

pdfcpu booklet out.pdf 2 essay.pdf


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.