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

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

People
Owner:
Nobody in particular
Requestors:
CLemmen [...] excelsiorintegrated.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
2.024



Subject: bug in PDF-API2-Lite
Date: Wed, 13 May 2015 13:58:32 -0400
To: "bug-PDF-API2@rt.cpan.org" <bug-PDF-API2@rt.cpan.org>
From: Charles Stuart Lemmen <CLemmen@excelsiorintegrated.com>

Greetings,

 

I’ve discovered a “bug” in the documentation for the PDF::API2::Lite package. Specifically, the documentation for creating a psfont file reference for a PDF file is incorrect. The documentation states that the call should be made this way:

 

$font = $pdf->psfont('/fonts/Univers.pfb','/fonts/Univers.afm','latin2');

 

However, this always results in an error being thrown EG:

 

no proper font-metrics file specified for '/fonts/Univers.pfb'. at C:/Perl64/site/lib/PDF/API2/Resource/Font/Postscript.pm line 27.

 

The fix is simple, format the call the way the PDF:: API2 documentation says to:

 

$font = $pdf->psfont('/fonts/Univers.pfb', -afmfile => '/fonts/Univers.afm', -encode => 'latin2');

 

And the errors disappear and PDF files are created normally. Due I see as the psfont() method is simply a pass-through to the ‘api’ class instance ref:

 

return $self->{api}->psfont(@args);

 

Thanks for writing PDF::API2::Lite.

 

Distribution name and version: PDF::API2::Lite ver. 2.023

Perl version: This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread

Operating System vendor and version: Windows 8 ver 6.3 (build 9600)

 

Stuart Lemmen

IT Development & Support

Excelsior Integrated LLC

413-394-4340

clemmen@excelsiorintegrated.com

www.excelsiorintegrated.com

Excelsior Integrated Small

 

Image displayed inline above

Thanks for the bug report. I've updated the documentation for the next release.


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.