18

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 |
|___________|            |___________|
then
 ___________
|           |
| 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 '14 at 20:57
7

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.

7

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”.

5

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 '14 at 6:47
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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