Reading PDF documents with Perl
From: Dave Campbell (pj_at_pjs-nest.com)
Date: 08/30/04
- Previous message: Chris Cole: "Re: Need help: perl script to FTP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 29 Aug 2004 23:03:50 GMT
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!
- Previous message: Chris Cole: "Re: Need help: perl script to FTP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|