Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gluing (Imposition) PDF documents

Tags:

I have several A4 PDF documents which I would like (two into one) "glue" together into A3 format PDF document. So I will get from 2PDFs A4 a single one sided PDF A3. I have found the excellent utility PDFToolkit and some others but none of them can be used to "glue" side by side two documents.

like image 557
Drejc Avatar asked Jan 21 '09 13:01

Drejc


2 Answers

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

like image 162
Adam Florin Avatar answered Sep 21 '22 21:09

Adam Florin


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
like image 32
Drejc Avatar answered Sep 18 '22 21:09

Drejc