Subject: | v2.035 - warning - BaseFont.pm line 113 |
Date: | Tue, 10 Sep 2019 11:28:19 +0200 |
To: | bug-PDF-API2 [...] rt.cpan.org |
From: | Karel Miko <miko [...] dcit.cz> |
The following sample code:
use PDF::API2;
my $pdf = PDF::API2->new();
my $page = $pdf->page();
my $font = $pdf->ttfont('DejaVuSerifCondensed.ttf');
my $text = $page->text();
$text->font($font, 20);
$text->translate(200, 700);
$text->text('Hello World!');
$pdf->saveas('test.pdf');
throws a bunch of warnings (approx. 70) like this:
Use of uninitialized value in sprintf at
/.../PDF/API2/Resource/BaseFont.pm line 113.
I am not sure what the proper fix is; possible workaround (BaseFont.pm
line 113):
- $stream .= sprintf(qq|<%04x> <%04x> <%04x>\n|, $j, $j,
$self->uniByCId($j));
+ $stream .= sprintf(qq|<%04x> <%04x> <%04x>\n|, $j, $j,
$self->uniByCId($j) || 0);