Sunday, June 10, 2007

Concatenating PDFs

A while back I downloaded the Basic Cryptanalysis Army Field Manual from the University of Michigan. The manual is available as a PDF-per-chapter, but I'd like to have the entire manual as one complete PDF.

Then I found out that Mac OS X already has this capability. With a pointer from this site I put together this command to create my single PDF:

/System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py -o military_cryptanalysis.pdf toc.pdf pref.pdf intro.pdf ch1.pdf ch2.pdf ch3.pdf ch4.pdf ch5.pdf ch6.pdf ch7.pdf ch8.pdf ch9.pdf ch10.pdf ch11.pdf ch12.pdf ch13.pdf ch14.pdf ch15.pdf appa.pdf appb.pdf appc.pdf appd.pdf appe.pdf appf.pdf gloss.pdf ref.pdf index.pdf

The resulting PDF is rather large (~31MB), so it seems that there could be some compression to be done. But, the point is you can concatenate PDFs easily right out of the box with OS X.

No comments: