Skip to content
Advertisement

How to stitch several PDF pages into one big canvas-like PDF?

I have a 32-page PDF of my family tree. Instead of having the family tree all on one really big PDF page (which is what I want), it is formatted so a group of 8 individual US letter-sized pages are supposed to be stitched across the width; 4 rows of this completes the tree. The margins of each page are all 22px.

If you visualize it in table form (where the numbers represent PDF page numbers):

table

I’ve tried to whip up some Python code to do this, but haven’t gotten very far. How can I stitch the PDF so it can be one big page instead of smaller individual pages?

Thanks for the help.

EDIT: Here’s the code I wrote. Sorry for not originally posting it.

JavaScript

Advertisement

Answer

As an alternative to Ben Jackson’s suggestion of first converting to PostScript, and doing an “N-up” transform on the PostScript files, there’s also a script called pdfjam, that can operate directly on PDF files.

Example:

JavaScript

The script is a wrapper for the pdfpages LaTeX package, recommended in another answer.

Advertisement