in reply to Unexpected file version error from PDF::API2

If ignoring failure is acceptible, you could just wrap the call to PDF::API2->open() in an eval.

eval { $pds = PDF::API2->open( $sourcepdf ) }; print "Not a recognizable PDF format\n$@" if $@;

...Untested. I'm assuming that PDF::API2 doesn't do something that would prevent you from trapping errors.


Dave