Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Reading PDF documents with Perl
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!

Report this thread to moderator Post Follow-up to this message
Old Post
Dave Campbell
08-30-04 08:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:54 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.