Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to print document in double side two-up A4 paper,

Page folding:

  / 1,2
 / / 3,4
< <
|\ \ 6,5
| \ 8,7
| / 9,10
|/ / 11,12
< <
|\ \ 14,13
| \ 16,15
| / 17,18
|/ / 19,20
< <
|\ \ 22,21
| \ 24,23

so the result page order should be:

1,8,3,6, 9,16,11,14, 17,24,19,22, (positive side of paper)
20,21,18,23, 12,13,10,15, 4,5,2,7 (reverse side of paper)

I'm using LaTeX, and I guess maybe I can do the rearrangement within LaTex, or maybe there is some utilities to do post-process on PDF documents?

share|improve this question
up vote 4 down vote accepted

Not the answer for pdf, but psbook from psutils can arrange pages in a ps file so it can be printed as a book. Use psnup from the same software to put multiple pages per sheet if you cannot do when printing.

The booklet LaTeX package seems to do all this at an earlier stage, but I haven't used it myself.

share|improve this answer
I've used the booklet package for LaTeX and it works wonderfully well. – Rob Hyndman Nov 11 '10 at 2:56

All the above solutions are fine for small booklets, but if you plan on binding a book, then you will need to consider stitching or gluing a stack of booklets together. These are known as signatures, and are typically 32 pages (a result of 8 sheets of landscape paper, double sided, and folded in half to give portrait pages). I imagine that Adobe acrobat would print a 800 page book as a single folded signature (booklet), which could not physically be folded too well.

To print a book of more than 32 pages, you are best to use the Latex booklet package, or the latex 2up macros, because it allows you to specify the number of pages per signature, and then produces a book as a series of n page signatures.

You should also consider that paper has a grain, and folding paper in half rotates the grain. It is better to cut A3 long grain paper in half to give two sheets of A4 paper with a cross grain, then configure latex with the booklets package (partial instruction below) to print 2 pages facing up on A4 landscape sheets, which can then be folded in half arriving at a long grain A5 page booklet. Be aware that the booklets package does not work with the hyperref package - but hyperrefs shouldn't be needed in a printed book.

The booklets package works most reliably if you explicitly set the booklet page size in the preamble as follows (for A4 paper stock):
\usepackage[print,1to1]{booklet} \nofiles % Must use this for final compile.
% 1to1 means no scaling/magnification, ie the page will be A5 as per the a5paper option
% which was passed to the memoir document class

% The paper stock will be landscape A4, which should be printed two-sided and folded.

And at the same time set the page size in your main tex file as:

share|improve this answer

instead of trying to rearrange the pdf pages, when you print the pdf using Acrobat Reader use the option of "Booklet" (or something similar), and Adobe Reader will handle the print order.

share|improve this answer
I may be outdated, but I think "Booklet" option assumes that all pages will be folded once together, not like the OP's desired result. – Kit Nov 11 '10 at 2:42

In one pass of TeX, pages have to be emitted in order. I don't think Pdf(La)TeX has an extension to change this.

However PdfTex is capable of reading pages from a PDF in random order. So you can use it as a tool to transform a pdf into another pdf with different page order, two pages in one and so on. The basic building block is the pdfpages package (it runs in PdfLaTeX) (it's in TeXlive, so it's probably already installed on your system).

Pdfjam is a command-line wrapper around the pdfpages LaTeX package. Recent versions include a pdfbook tool which can generate at least simple booklets. You're asking for a less common layout, so it might not be directly achievable with pdfbook, but you can pass --tidy false to pdfbook to see how it invokes PdfLaTex, and tweak the LaTeX wrapper to get the desired page setup.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .