in reply to Re^6: CAM::PDF w/ Text::PDF::FlateDecode
in thread CAM::PDF w/ Text::PDF::FlateDecode

ANOTHER IMPORTANT UPDATE TO THE PROBLEM WITH CAM-PDF

I've asked advice to the CAM-PDF author and he put me on the right way by saying that this error with CAM-PDF:
Failed to open filter FlateDecode (Text::PDF::FlateDecode) Unrecognized type in parseAny: 1 £ý¢-«ý-_ØÎ_O_:÷n£Õ-¦ê¦H¸l-0á×ÁÄ[éåtu!-...
... is FAULT of Compress::Zlib module.

Actually I had Compress::Zlib installed, in spite of it not being a dependency of CAM-PDF. I installed Compress::Zlib since it was a dependency of PDF-API2 module, another module to handle pdf files, but I've never been able to use PDF-API2 due to some errors.

So I've tried to uninstall PDF-API2 and Compress::Zlib and, magic, THE ERROR WITH CAM-PDF HAS DISAPPEARED AND EVERYTHING WORKS FINE.

Replies are listed 'Best First'.
Re^8: CAM::PDF w/ Text::PDF::FlateDecode
by jasman (Initiate) on Jun 21, 2010 at 18:24 UTC
    I am a novice perl user. I'm confused. I've downloaded CAM-PDF-1.52 and Crypt-RC4-2.02. I still get the noted error message about ThateDecode. So I downloaded Text-PDF-0.29 which has a dependency for IO-Compress-2.027. I downloaded the dependencies for IO-Compress-2.027 as well. I still get the error. This is a huge brick wall for me and I'd appreciate any help in climbing over it. The perl script that I downloaded to read the text of the PDF is: #!/usr/bin/perl use strict; use CAM::PDF; # Name of the Perl Module use CAM::PDF::Content; # Name of the Perl Module my $file_name = shift; my @lines; my $pdf = CAM::PDF->new($file_name); for my $page (1 .. $pdf->numPages()) { my $text = $pdf->getPageText($page); @lines = split (/\n/, $text); foreach (@lines) { print "$_\n"; } } Currently Compress::Zlib is uninstalled. Thanks, Jim