Thushan
Thushan

Reputation: 348

Is there a test suite for PDF files?

Is there a test suite for PDFs, preferably in Perl? What I want is some function to test positioning and existence of some text (and if possible a name of a grapic) in a PDF file. Is this theoritically possible with PDF markup?

Thank you for your help.

Upvotes: 8

Views: 497

Answers (2)

Chris Dolan
Chris Dolan

Reputation: 8963

As jrockway said, there's not a 100% solution available today. With my CAM::PDF library, you can compute positions for any element in the document. See my answer to "How do I get character offset information from a pdf document?" which shows how to extract coordinates for all text on a page.

Upvotes: 4

jrockway
jrockway

Reputation: 42674

I don't think there is anything pre-built on the CPAN, but Test::Builder and CAM::PDF should allow you to write what you want.

Once you get it working, upload it to the CPAN... and then there will be a way to test PDFs on the CPAN :)

Upvotes: 4

Related Questions