PhilterPaper / Perl-PDF-Builder

Extended version of the popular PDF::API2 Perl-based PDF library for creating, reading, and modifying PDF documents
https://www.catskilltech.com/FreeSW/product/PDF%2DBuilder/title/PDF%3A%3ABuilder/freeSW_full
Other
6 stars 7 forks source link

[RT 130482] v2.035 - warning - BaseFont.pm line 113 #107

Closed PhilterPaper closed 4 years ago

PhilterPaper commented 4 years ago

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);
PhilterPaper commented 4 years ago

Tue Sep 10 11:05:29 2019 PMPERRY@cpan.org - Correspondence added

Already dealt with: https://github.com/ssimms/pdfapi2/commit/18038a4bd49df304335d78aa1b4ba1d949af1954

Tue Sep 10 11:05:29 2019 The RT System itself - Status changed from 'new' to 'open'