Embed fonts in PDF
"mike.xtinction" <mike.xtinction-/[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.pdfapi2 |
|---|---|
| Message-ID | <[email protected]> |
Hello all,
I've just recently started using PDF::API2, to create a report
generation mechanism, and despite the excruciatingly sparse
documentation (pointers in this regard would be very appreciated),
I've managed to overcome most of the obstacles. The last remaining
itch concerns font embedding. So far I've been using only Corefonts,
but it was requested to use another TTF font. I've got the *.ttf file,
and wanted to embed it in the PDF, in a manner that the readers need
not have that font in their systems. I tried the following approaches:
PDF::API2::Resource::CIDFont::TrueType->new_api($pdf,FONT_PATH.'ItRo____.ttf')
$pdf->ttfont(''.FONT_PATH.'ItRo____.ttf'),
Both of them throw a bunch of warning like this:
Argument "X" isn't numeric in array element at
/usr/share/perl5/PDF/API2/Resource/BaseFont.pm line 558.
Argument "Y" isn't numeric in array element at
/usr/share/perl5/PDF/API2/Resource/BaseFont.pm line 558.
Argument "Z" isn't numeric in array element at
/usr/share/perl5/PDF/API2/Resource/BaseFont.pm line 558.
Argument "space" isn't numeric in array element at
/usr/share/perl5/PDF/API2/Resource/BaseFont.pm line 558.
Use of uninitialized value in addition (+) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 358.
Use of uninitialized value in numeric ne (!=) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 358.
Use of uninitialized value in numeric eq (==) at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 359.
Use of uninitialized value in pack at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 395.
Use of uninitialized value in pack at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 337.
Use of uninitialized value in pack at
/usr/share/perl5/PDF/API2/Basic/TTF/Cmap.pm line 337.
(in both cases it goes on with the rest of alphabet letters...)
I'm using PDF::API2 version 0.57-1.
Help is greatly appreciated!
Thanks in advance,
Mike