Skip Menu |

This queue is for tickets about the PDF-API2 CPAN distribution.

Report information
The Basics
Id: 130482
Status: resolved
Priority: 0/
Queue: PDF-API2

People
Owner: Nobody in particular
Requestors: miko [...] dcit.cz
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.036



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);
Version 2.036 is now on CPAN and eliminates this warning.