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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^5: Using CAM::PDF module to read the pdf content
by Corion (Patriarch) on Mar 08, 2010 at 09:04 UTC

    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 };