« How to stop CrashPlan from continuously crashing | Main | Formatting short dates in AppleScript »

Rotate portrait pages by 90 degrees in a PDF

The problem: I get huge packets of landscape documents that I need to scan. I'm too forgetful to set up a separate ScanSnap profile to turn off automatic detection of landscape versus portrait orientation. And, the ScanSnap software is good at detecting portrait versus landscape, but not perfect. I know all the pages should be landscape. So, I just need an automated way to rotate only the portrait pages.

The solution: