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

I want to get the meta information of pdf, tried with the following modules, couldnt get the desired result.
use PDF::Parse; $pdf->LoadPageInfo; $pdf->TargetFile($filename); my $info = $pdf->GetInfo("Title"); print $info;
i get the following error: Can't call method "LoadPageInfo
Shiva

Replies are listed 'Best First'.
Re: PDF information
by Zaxo (Archbishop) on Sep 02, 2005 at 10:38 UTC

    You are treating the undefined variable, $pdf, as a blessed object. With no blessings, perl can't locate a method.

    Try this instead,

    use PDF; my $pdf = PDF->new($filename); my $info = $pdf->GetInfo('Title'); print $info, $/;
    PDF::Parse is a utility module of PDF. It does not provide a constructor.

    After Compline,
    Zaxo

      It's working quiet well. Thanks for ur code.
      Regards,
      Shiva