what is pdfjam
?
pdfjam
is a script designed for assembling and adjusting
PDF files. it can rearrange and resize pages onto larger sheets, making
it a great tool for creating zines and booklets! i use it for zine
projects such as imaginary
landscapes and for printing manuals and documentation for
hand-binding.
installing pdfjam
pdfjam
is included the TeX Live suite. on
Debian-based systems, the texlive-extra-utils
package
contains it; for Mac OS, Windows, and other Linux distributions, see the
TeX Live website.
making simple booklets
the following command arranges an ordinary pdf into sets of double-sided sheets with two pages per side. when folded down the middle, the sheets assemble into one large booklet.
pdfjam INPUT.pdf --booklet true --paper letter --landscape --outfile OUTPUT.pdf
(letter
may of course be substituted for a4
or any other needed paper size. unsupported paper sizes can use the
--papersize
option instead; see the making one-sheet
zines section.)
pdfjam
can also generate chunks of smaller booklets
known as signatures. this is useful for binding larger books
that cannot fit into a single booklet! for example, this command creates
individual signatures of 16 logical pages each, making booklets of 4
sheets which can then be arranged sequentially.
pdfjam INPUT.pdf --signature 16 --paper letter --landscape --outfile OUTPUT.pdf
adding blank pages and rearranging pages
to add a page range, insert a comma-separated list after the input
filename. {}
inserts a blank page; ranges without the first
or last argument default to the first or last page, respectively. this
command prints the first page, a blank page, the third and fourth pages,
another blank page, and all of the pages from the fifth on:
pdfjam INPUT.pdf '1,{},3-4,{},5-' ...
adjusting page spacing and layout
sometimes the pages arranged into a booklet may be spaced or
positioned awkwardly or have unreadable margins, especially if the
source document is not designed for booklet printing! the first step to
resolving these is to get a look at how pdfjam
actually
positions pages. adding --frame true
to any command causes
the program to draw some nice boxes:
to remove unnecessary margins from the document, use the
--trim
and --clip
options:
pdfjam ... --trim '2.5cm 0cm 2.5cm 0cm' --clip true ...
trim
's arguments correspond to the amount taken off of
the left, bottom, right, and top sides, respectively. they may be
supplied with in
or other units as well.
by default, pdfjam
tries to pack its pages very closely
to one another. this is probably counterproductive for booklets that
need larger margins. the --delta
option forces it to space
the pages farther from one another:
pdfjam ... --delta '2.5cm 0cm' ...
its arguments refer to the horizontal and vertical spacing
respectively; vertical spacing is irrelevant for simple 2x1 booklets.
note that if the argument to delta gets too large, pdfjam
will shrink the pages to compensate!
making one-sheet zines
pdfjam can also make foldable eight-page zines. first, take the pages on the top and place them into a temporary document, then do the same for the bottom pages:
pdfjam INPUT.pdf '5-2' --angle 180 --papersize '{5.5in,8.5in}' --outfile TEMP1.pdf
pdfjam INPUT.pdf '6-8,1' --papersize '{5.5in,8.5in}' --outfile TEMP2.pdf
the --papersize
option is important! pdfjam will default
to letter output if it is not specified instead of taking the source
files' size. the 8-page zine format needs half-letter proportions to
work properly! the regular --paper a4
is fine for A4
output.
to assemble the final zine:
pdfjam TEMP1.pdf TEMP2.pdf --landscape --paper letter --nup 4x2 --outfile OUTPUT.pdf
more information
the official
pdfjam
documentation is available on GitHub.
pdfjam
is built on the pdfpages
LaTeX
package.
acknowledgements
the example images from this page use the Little Sound DJ manual. LSDJ is a GameBoy music creation tool available for purchase here.
pdfjam
was created by David Firth.