Note to self: Making a booklet from a pdf

There is a lot of really great pdf documentation out there.  Whether it is a manual for something or an actual book or some documentation or whatever.  I recently was taking a look at the KOMA-Script LaTeX bundle, and it comes with scrguien.pdf, which is the English (‘en’) version of the guide (‘gui’).  It has a lot of useful info in it and the bundle is complicated, so having a manual beside you to ‘work your way through’ is handy. To turn it into a nice printable manual I used three commands:

pdftops scrguien.pdf

psbook | psnup -pa4 -b2cm -m-1.5cm -W511pt -H595pt -2 >

ps2pdf -sPAPERSIZE=a4 -dEmbedAllFonts=true

Well, actually I used about 20 commands, but these three are the ones I would have used right off if I’d been smart enough. Note in reality there are only three lines of commands — the blog tends to wrap lines pretty short.

It’s pretty obvious what the first one (pdftops) does — it takes the downloaded pdf and turns it into a ps file.

Looking at the header of the ps, I see this:

%%DocumentMedia: 511x596 511 596 0 () ()
%%BoundingBox: 0 0 511 596

The command to create a book from the newly created .ps file is psbook, whose man page says it is part of psutils. To put the pages side by side, psnup is the tool of choice.

In using it, I have specified the input Height and Width in (Adobe, 72-to-the-inch) points, the output size (A4) a margin around the final sheet of -1.5cm (note the negative) and around each page on the sheet of 2cm.  This gives me a 4cm column up the middle and an 0.5cm margin around the outside. These dimensions maybe could use some tuning, and would depend on how you’re binding the thing.

The last command converts back to pdf.

The next step is to print double sided with a short-edge flip, guillotine  in half, then use a heavy duty stapler to make an A5 book — hence the wide inside margins.

Reversed cover of a quick and easy booklet.

Reversed cover of a quick and easy booklet.

Not exactly professional quality, but on the increasingly rare occasions when a paper copy is desirable it is quick and reasonably efficient.


Tags: , , , , , , , , , , ,

About Darren

I'm a scientist by training, based in Australia.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: