There have been many hints here about combining PDFs over the years. All but one required either third party software, or old versions of OS X. The most recent hint notes that Automator has a combine PDF action built-in. This is great, of course, if you're using Automator. But what if you want to combine PDFs in an AppleScript, or from the Terminal? How come Automator gets to have all the fun?
Well, if you crack open the Combine PDF action bundle, Automator's PDF combining secrets are laid bare: a Python script! Not just that, but a Python script with usage info:
join [--output <file>] [--append] [--shuffle] [--preview] [--verbose]
And here is how it might be used:
$ python '/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py' -o '/path/to/output.pdf' '/path/to/input1.pdf' '/path/to/input2.pdf'Where /path/to/input1.pdf and /path/to/input2.pdf are the PDF files to be combined, and /path/to/output.pdf is the new combined PDF. /path/to Shell and AppleScript programmers should have little trouble finding use for a ready-made PDF combining service that exists on every standard OS install. I've already rolled it into a neat folder action AppleScript that you can find here.
[robg adds: If you're going to use this yourself often, you should probably create a soft link to the location, or maybe just copy it out to your own bin directory.]

