Subject: | Cannot get page_count from attached PDF |
Date: | Wed, 10 Jun 2020 15:03:16 +1000 |
To: | "" <bug-pdf-tiny [...] rt.cpan.org> |
From: | "Ray Norrish" <ray [...] niptech.net.au> |
Hi,
When i run the following code with the attached pdf
<code>
#!/usr/bin/perl
use strict;
use warnings;
use PDF::Tiny;
my $filename = $ARGV[0];
my $pdf = new PDF::Tiny $filename;
my $page_count = $pdf->page_count;
print "$filename has $page_count page", 's'x($page_count!=1), ".\n";
</code>
I get the following error:
Can't use an undefined value as an ARRAY reference at /usr/local/share/perl/5.20.2/PDF/Tiny.pm line 205.
I have been using your module for a number of years without issue until today.
I suspect that the PDF is malformed in some way
Regards
Ray Norrish
Nip Technologies Victoria Australia
Message body not shown because it is not plain text.