Not afraid of the command line?
Then Pdftk is worth your time. I needed to rotate the pages of a document I had scanned. I downloaded Pdftk, installed it and run the command I needed from the command line (what I needed happened to be one of their examples!). It can be easily used from Groovy or any other programming language.
It can be found at: http://www.pdflabs.com/