Blow up that PDF

So I run a lot of Pathfinder games. Each of the games are from  a scenario downloaded from The PDF has a ton of info. Baddies to fight, maps of the areas, fun images. When GMing online (using MapTool), I need most of the images in separate files. So, how do I extract all of the images in a PDF.

Simple. I use the linux command line tool pdfimages. This works great for a linux or mac.

All you have to do is go to the pdf’s directory in a terminal and run:
pdfimages -j filename.pdf outputname

Make sure you use the -j option to make all things a jpg instead of a ppm file.

Another tool that helps with creating a pdf for just the chronicle sheet is docsplit. In fact, I wrote a small bash script to take a folder of pdfs and extract the last page of each pdf. This only works if the PDF is 100 pages or less.
for file in `ls $folder`; do
docsplit images -d 300 $folder/$file -p 100| grep "Requested" | awk '{ print $13 }' | xargs docsplit images -d 300 $folder/$file -o $destination -p

All of this is for the love of Pathfinder.

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 )

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

%d bloggers like this: