Punitha has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I need to take PDF file description and validate it. I tried this,
use strict; use warnings; use PDF; my $pdf = PDF->new("0001.pdf"); my $version = $pdf->Version; my $title = $pdf->GetInfo("Title"); my $author = $pdf->GetInfo("Author"); print "$version\n$title\n$author\n";
Some of the PDF files, it works fine. For many PDF files it throws an error as:
Premature end of file reached at valid.pl line 5 Bad object reference '' at valid.pl line 5 Bad object reference '' at valid.pl line 5 Bad object reference '' at valid.pl line 5 Use of uninitialized value in concatenation (.) or string at valid.pl +line 9. Use of uninitialized value in concatenation (.) or string at valid.pl +line 9. 1.6
I don't know why this is happening and how to rectify this. Can any one help me.
Thanks in advance.
Punitha
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Retrieve the PDF file description
by marto (Cardinal) on Apr 29, 2006 at 11:13 UTC | |
by Punitha (Priest) on Apr 29, 2006 at 12:11 UTC | |
by marto (Cardinal) on Apr 29, 2006 at 12:27 UTC | |
Re: Retrieve the PDF file description
by bowei_99 (Friar) on Apr 29, 2006 at 16:45 UTC | |
Re: Retrieve the PDF file description
by Anonymous Monk on Dec 23, 2012 at 19:41 UTC | |
by roboticus (Chancellor) on Dec 23, 2012 at 20:29 UTC | |
by Anonymous Monk on Dec 23, 2012 at 20:38 UTC | |
by Anonymous Monk on Dec 23, 2012 at 20:16 UTC |
Back to
Seekers of Perl Wisdom