CaMelRyder has asked for the wisdom of the Perl Monks concerning the following question:

Hey everybody,

I've been trying to open a PDF doc using CAM::PDF.
This keeps spitting out the error

"Failed to open filter FlateDecode (Text::PDF::FlateDecode)"

I took the liberty of installing Text::PDF and also, to beat
a dead horse, PDF::API2.

I have actually had this problem before. I never solved
it though. I just remember it being a brick wall.

I have switched from fedora to ubuntu back to fedora
since then. I remember not having any trouble with
CAM::PDF if fedora.

Any ideas on this error?

¥peace from CaMelRyder¥

Replies are listed 'Best First'.
Re: CAM::PDF w/ Text::PDF::FlateDecode
by almut (Canon) on Aug 20, 2007 at 20:19 UTC

    Can you do

    perl -MText::PDF::Filter -e "Text::PDF::FlateDecode->new()"

    without getting an error?  If not, you probably haven't installed Text::PDF correctly, or - if you've installed it in a non-standard place - need to tell Perl where to find it (using "use lib '...';" or some such).

      Nope, no error message when i run

      perl -MText::PDF::Filter -e "Text::PDF::FlateDecode->new()"
      It runs fine.
      ¥peace from CaMelRyder¥
        I ended up converted the pdf to a text file using pdftotext.
        Then I modded my original program to read from that.
        
        However, I would like to know a programmatic solution to this problem
        since I have run into it twice and have failed both times.
        
        
        
        ¥peace from CaMelRyder¥