When I used PDF.pm for my local needs, I reworked it a lot, because it is not only warnings and strict unsafe, but also it does not always parse things correctly.
I did not succeeded polishing it to 100% working state yet.

Another solution - if your machine have Acrobat (exchange) you can use Win32::OLE module. It is not enough to have Acrobat Reader installed in this case :(

use strict; use Win32::OLE; use Win32::OLE::Const; my $abat = Win32::OLE->new('AcroExch.App'); my $abdoc = Win32::OLE->new('AcroExch.AVDoc'); $abdoc->Open('d:\Documentation\perl\xtk.pdf','d:\Documentation\perl\xt +k.pdf'); my $pddoc = $abdoc->GetPDDoc; print "pp=".$pddoc->GetNumPages,"\n"; for (qw(Title Subject Author)) { print "$_:".$pddoc->GetInfo($_),"\n"; }
Acrobat SDK documentation have information about how automate it via OLE.

Warmest wishes,
Vadim


In reply to Re: PDF GetInfo( by svad
in thread PDF GetInfo( by axelrose

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.