in reply to Re^2: Converting Text from PDF using CAM::PDF
in thread Converting Text from PDF using CAM::PDF

You're right---it doesn't work:); however, as I see it, the problem isn't with CAM::PDF but rather with the google pdf. I think that google is great for searching the web, but when it comes to anything else, it's not so good. I've tried the code with my own non-google pdf's and it works. Try this, and let me know if it works or not:
#!/usr/bin/perl use strict; use warnings; use CAM::PDF; use LWP::UserAgent; my $pdf_filename = '/root/Desktop/perl.pdf'; my $pdf_link = 'http://www.greenteapress.com/perl/perl.pdf'; my $client = LWP::UserAgent->new(); my $capture = $client->get("$pdf_link", ":content_file" => "$pdf_filen +ame"); convert_pdf_to_text(); sub convert_pdf_to_text { use CAM::PDF::PageText; my $pdf_filename = '/root/Desktop/perl.pdf'; my $pdf = CAM::PDF->new($pdf_filename); my $y = $pdf->getPageContentTree(1); print CAM::PDF::PageText->render($y); }

Replies are listed 'Best First'.
Re^4: Converting Text from PDF using CAM::PDF
by ww (Archbishop) on Jun 23, 2010 at 00:12 UTC
    Same procedure as in prior reply; print what appears to be the entire multi-page text.
Re^4: Converting Text from PDF using CAM::PDF
by Anonymous Monk on Jun 22, 2010 at 23:36 UTC
    the problem isn't with CAM::PDF but rather with the google pdf

    In other words, the problem is with CAM::PDF, for example