Gluing (Imposition) PDF documents

I would like to advertise my pdftools

It's written in Python so should run on any platform. It's a wrapper to Latex (the pdfpages packages) but can do lot of things with a single command line: merge pdf files, nup them (multiple input pages per output page) and number the pages of the output file (you specify the location and the format of the number) It still needs some work but I think it's quite stable to be usable right now :)


This puts two landscape letter pages onto a single portrait letter sheet, to be "bound" (i.e., folded) along the top.

pdftops $1 - | 
psbook | 
pstops -w11in -h8.5in '4:[email protected](.5in,0in)[email protected](.5in,5.5in),[email protected](8in,5.5in)[email protected](8in,11in)' | 
ps2pdf - $(basename $1 .pdf).psbook.pdf

By the way, I do this often, so I'll probably submit more "answers" to this question just to keep track of successful pstops pagespecs. Let me know if this is an inappropriate use of SO.


I just came across a nice tool on superuser.com called PDFjam that can do all of the above in a single command:

pdfjam --nup 2x1 file1.pdf file2.pdf --outfile DONESKI.pdf

It has other standard features like page size plus a nice syntax for more sophisticated collations of pages (the tricky page re-ordering necessary for true booklet-style page imposition).

It's built on top of TeX which is, whatever it is. Installing is a breeze on Ubuntu: you can just apt-get install pdfjam. On Mac OS, I recommend getting BasicTeX (google "mactex basictex"; SO thinks I'm a spammer and won't let me post the link).

This is a lot easier and more maintanable than installing both pdftk and Multivalent (on both Mac OS for dev and Ubuntu for deploy), which wasn't going so well for me anyway...!


Found the following (free and open-source) tool for doing Imposition called Impose (thanks danio for the tip). This solved my problem perfectly.

EDIT: Here is how it's done:

Use PDF Toolkit to joint two PDF files into one (two A4)

pdftk File1.pdf File2.pdf cat output OutputFile.pdf

Create from this a single page (one A3):

java -cp Multivalent.jar tool.pdf.Impose -dim 2x1 -verbose -paper-size "42.2x29.9cm" -layout "1,2" OutputFile.pdf