I'm doing some automated regression testing on a web application using Rational Functional Tester with Java. I need to test some PDF files produced by that application, comparing them with a "base" PDf file that has been manually validated. The testing is content-based, meaning that little differencies in disposition on page are tolerated. Some content like dates or purchase IDs are variable, and should not be considered errors, so I need comparing with regexps or similar. Image matching with adjustable tolerance would be a great plus, for comparing QR codes and other bar codes.
When an error occours, I want a screenshot with base page and the faulty one.
Actually I built a wrapper around this library to suit my requirements
http://www.inetsoftware.de/other-products/pdf-content-comparer
It works quite good for PDF-1.3, but seems like the library poorly supports files in PDF-1.4 format. It's not possible to change the output format of the web app, and regression bugs are quite common in the prints.
Any PDF comparer library to suggest? Preferred language is Java, as RFT is Java based, but anything's fine.