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

Report information
The Basics
Id:
130482
Status:
resolved
Priority:
Low/Low
Queue:

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

BugTracker
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.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.