Office super-tool: pdftk

If you scan or print a lot of documents, you have probably used PDF files. They are very nice, but it can be tricky to modify and otherwise handle them. Enter pdftk: great (but small), free (but valuable) and powerful (but simple). It’s also open source, which means you can learn it now, and use it the same way in five, ten, or twenty years.

I was recently sending out 28 temp job applications with six attachments each. I printed out the motivation letter for each job and 28 copies of each attachment, so I ended up with seven piles of paper which I then had to mix by hand to make 28 applications. Tedious work, and I could have smacked myself when I realized that it would have been much easier to put all the attachments in a single document, and printing that 28 times: Two piles instead of seven. This is really simple with pdftk – Just start up a shell (In Windows: Start → Run → cmd, in Ubuntu: Applications → Accessories → Terminal), and replace the file names in the following command with your own to produce a new file with all the documents in sequence:

pdftk cv.pdf "reference letter 1.pdf" [and so on] cat output new.pdf

cat is the magic word: Concatenate all the files before it. pdftk can also do other useful stuff, like rotating pages (if they were scanned the wrong way around), splitting, watermarking, digital signatures and much more (see examples).


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 )

Google+ photo

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

Connecting to %s