Making zines with pdfjam

Published
2020-04-27
Tagged

The past few weeks, I’ve been looking at zines in a new light. I’ve always liked the idea of printing out little books at home, but given we’re all trapped indoors right now, it seems like a great time to do a little craft activity.1

I got interested in a more-then-theoretical way thanks to “writer who draws” Austin Kleon, who posted this post on making an eight-page zine from a single sheet of A4 paper, but then he posted this video from autumnthing on how to make a fourteen-page zine, and it blew me away:

So! Sometimes you’re feeling creative and you want to make a zine by hand. And sometimes you want to print everything, because printers are much neater about layout and making text quite small and still readable. But actually laying out your zine requires a good deal of jiggery-pokery, as you take the individual pages, somehow shrink them down to one-eighth their original size, sometimes rotate them 180°, and lay them all out for printing, folding, and cutting.

Trying to do this all in your word processor seems like a mug’s game. Thankfully, you can outsource the hard part - the cutting-and-pasting to get everything onto one page - to a little command-line program called pdfjam. This is how.

Installing pdfjam

Note that this requires you to install LaTeX on your computer, and requires “a Unix-like operating system” (which includes OS X). Thankfully for us, the pdfjam documentation goes through the requirements and installation process pretty thoroughly. In saying that, installing LaTeX isn’t everyone’s jam. Sorry!

Making an initial PDF

The first thing you need to do, it build a PDF of your zine, like you were going to print one page on each page rather than ramming them all together. It’s up to you how you do this - on OS X, you can always print a document to PDF.

Making the zine

From my experience, we’ll want to arrange our pages like this, in order to build your eight-page zine:

Although this is by no means the only way to lay out pages.

As you can see, we’ll want to make sure that the bottom row of pages is the right way up, and the top row is rotated by 180°. We can’t do this on a page-by-page basis with pdfjam. What we can do, however, is split our work into two “batches”, rotate the top row, and then merge them together:

1
pdfjam --angle 180 --outfile temp_odd.pdf -- sample.pdf "7,6,5,4"
2
pdfjam --outfile temp_even.pdf -- sample.pdf "8,1,2,3"

We’ll now have two files - one with our top row of pages, all rotated by 180°, and one with our bottom row of pages, remaining as they were. It’s the work of one more line to put them together - and we’ll add a nice frame as well:

1
pdfjam --nup 4x2 --frame true --landscape --a4paper --outfile output.pdf -- temp_odd.pdf temp_even.pdf

Here we create an n-up 4x2 grid with the pages we’ve previously rotated.

And that will give us the correct layout for our 8-page zine.

If you want to condense things further, you can put this all together in a script. I’m using ruby, but to be honest you should be able to adapt this to any language:

1
#!/usr/bin/env ruby
2
doc = ARGV[0]
3
4
puts "Zine-ifying #{doc}..."
5
6
# Odd pages
7
`pdfjam --angle 180 --outfile temp_odd.pdf -q -- #{doc} "7,6,5,4"`
8
9
# Even pages
10
`pdfjam --outfile temp_even.pdf -q -- #{doc} "8,1,2,3"`
11
12
# Merge them together
13
`pdfjam --nup 4x2 --frame true --landscape --a4paper --outfile output.pdf -q -- temp_odd.pdf temp_even.pdf`
14
15
# Remove temporary files
16
`rm temp_odd.pdf temp_even.pdf`

The beauty of this workflow is that you can expand it pretty easily for a fourteen-page zine. Here’s what I’ve got:

1
#!/usr/bin/env ruby
2
doc = ARGV[0]
3
4
puts "Zine-ifying #{doc}..."
5
6
7
# Top row - 14, 1, 2, 3, rotated
8
`pdfjam --angle 180 --outfile temp1.pdf -q -- #{doc} "3,2,1,14"`
9
10
# Second row - 4,5,6,7, non-rotated
11
`pdfjam --outfile temp2.pdf -q -- #{doc} "4,5,6,7"`
12
13
# Third row - 8, 9, 10, 11, rotated
14
`pdfjam --angle 180 --outfile temp3.pdf -q -- #{doc} "11,10,9,8"`
15
16
17
# Last row - 12, 13, blank, blank, non-rotated
18
`pdfjam --outfile temp4.pdf -q -- #{doc} "12,13"`
19
20
# Merge them together
21
`pdfjam --nup 4x4 --frame true --a4paper --outfile output.pdf -q -- temp1.pdf temp2.pdf temp3.pdf temp4.pdf`
22
23
`rm -rf temp1.pdf temp2.pdf temp3.pdf temp4.pdf`

Want an example of these scripts in action? Here is a copy of Golden Pie Stories, transcribed onto A4 and ready for you to print-and-play. And if you don’t mind my saying, it looks pretty snazzy:


  1. I’ve also had to create not one but two “special occasion” cards from scratch - and if you’re going hand-made, you might as well make it an eight-page mini-booklet folded together from an A4 sheet of paper.