| Dave Campbell 2004-08-30, 3:56 am |
| Hi all.
I'm new with perl and trying to get a script to read the 'Subject' field
out of a document using PDF::Parse and the following code:
#!/usr/bin/perl -w
use PDF::Parse;
open($pdf_file,"<067232489X.pdf") or die("Cannot open file!");
$pdf->TargetFile($pdf_file);
$pdf->LoadPageInfo;
$subject = $pdf->GetInfo("Subject");
print "The subect of file $pdf is:\n";
print $subject;
I'm not really sure if I've got much of anything right, but I'm getting
the following error trying to run this code:
PDF::Core::PDFGetPrimitive() called too early to check prototype at
D:/StudyPerl
/site/lib/PDF/Core.pm line 288.
PDF::Core::PDFGetPrimitive() called too early to check prototype at
D:/StudyPerl
/site/lib/PDF/Core.pm line 294.
Can't call method "TargetFile" on an undefined value at pdf_check.pl line 8.
Can anyone possibly help me figure out where I'm going wrong with this?
Thanks!
|