in reply to Re^4: Using CAM::PDF module to read the pdf content
in thread Using CAM::PDF module to read the pdf content

Again, you are not checking for errors. The documentation for getPageContentTree says (bold by me):

Retrieves a parsed page content data structure, or undef if there is a syntax error or if the page does not exist.

So, check for errors, and you should find the errors:

my $content = $pdf->getPageContentTree($page); if (! $content) { warn "Couldn't get content for page $page: $CAM::PDF::errstr"; # thanks to Anonymous Monk for pointing out the error variable } else { # process the page };