Post without Account — your post will be reviewed, and if appropriate, posted under Anonymous. You can also use this link to report any problems registering or logging in.

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

  • 1 Replies
  • 20 Views
*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 586
    • View Profile
[RT 130482] v2.035 - warning - BaseFont.pm line 113
« September 10, 2019, 11:16:16 AM »
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:

Code: [Select]
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:
Quote
    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):
Code: [Select]
- $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);

*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 586
    • View Profile
Re: [RT 130482] v2.035 - warning - BaseFont.pm line 113
« Reply #1: September 10, 2019, 11:16:53 AM »
Tue Sep 10 11:05:29 2019 PMPERRY@cpan.org - Correspondence added

Already dealt with: ssimms/pdfapi2@18038a4

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

Rejected.