in reply to pdf manipulation

Suggest you have a look at Image::Magick, which can do pdfs. It's a free image manipulation application, with Perl (among other) libraries - it's very adaptable.

andy.