Zed Lopez

Fun With PDFs

I’ve bought some role-playing game PDFs in recent weeks. A bunch of them are formatted for 6″×9″ pages (in part inspired by optimizing for iPads.) But I don’t have a tablet, or a large reader, and printing out pages that small on letter-size pages would be a big waste.

This is why pdfjam is my new best friend.

First, I examine the PDF to see which pages I want to keep, skipping any ads and often the covers or license text. Depending on the layout, it might be important to maintain what’s recto and verso, but here I don’t.

pdfjam sotc-electronic-edition-regular-20060914 ‘3,5-419’

I have

paper=letterpaper
in my

/etc/pdfjam.conf
, so this automatically converts to letter size.

This leaves me with those pages in sotc-electronic-edition-regular-20060914-3,5-419-pdfjam.pdf. pdfjam and its sibling, pdfnup, are nicely predictable in this regard.

Now I’ll put them two to a page, scaling up the size a little.

pdfnup sotc-electronic-edition-regular-20060914-3,5-419-pdfjam.pdf —nup 2×1 —scale 1.1

This leaves me with a ginormous white river in the middle of the page. pdfnup offers various cropping and moving options, but I don’t see that you can move left pages a little to the right and right pages a little to the lift, which would be ideal for me.

Last up is rotating the pages to portrait orientation.

pdf90 sotc-electronic-edition-regular-20060914-3,5-419-pdfjam-nup.pdf

My new next-best-friend is gnome-manual-duplex. But I don’t want to just dump the whole thing to the printer, because any mistakes (like the printer grabbing two sheets at once) would ruin the rest of the stack. So I break it up. (Obviously, it’s important to start on an odd page and finish on an even page.)

pdfjam sotc-electronic-edition-regular-20060914-3,5-419-pdfjam-nup-rotated90.pdf 5-52 -o out.pdf

I’ve symlinked

/usr/local/bin/duplex
to

/usr/bin/gnome-manual-duplex
, so:

duplex out.pdf