RE: Font Error??
"Tim Turner" <[email protected]> Wed, 17 Oct 2007 17:12:39 -0400
| Newsgroups | gmane.comp.lang.perl.modules.pdfapi2 |
|---|---|
| Message-ID | <[email protected]> |
You might need to specify the full path to the font file on your computer. Try that and see if it makes a difference. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Ben Sent: Wednesday, October 17, 2007 4:47 PM To: [email protected] Subject: [perl-text-pdf-modules] Font Error?? I am trying to add font to the pdf, I beilieve I am doing this correctly by: my %font = ( Myriad => { Bold => $pdf->ttfont('MyriadPro-Bold.otf'), Roman => $pdf->ttfont('MyriadPro-Regular.otf'), }, ); and I call the font using $font{'Myriad '}{'Bold'} but I get this error and I am not sure what it means v2rep.pl: Argument "a" isn't numeric in array element at /usr/lib/perl5/site_perl/5.8.8/PDF/API2/Resource/BaseFont.pm line 558. [Wed Oct 17 13:05:28 2007] v2rep.pl: at /usr/lib/perl5/site_perl/5.8.8/PDF/API2/Resource/BaseFont.pm line 558 [Wed Oct 17 13:05:28 2007] v2rep.pl: PDF::API2::Resource::BaseFont::wxByGlyph('PDF::API2::Resource::CIDFont::True T ype=HASH(0x34ac700)', 'a') called at /usr/lib/ perl5/site_perl/5.8.8/PDF/API2/Resource/BaseFont.pm line 304 [Wed Oct 17 13:05:28 2007] v2rep.pl: PDF::API2::Resource::BaseFont::avgwidth('PDF::API2::Resource::CIDFont::TrueT y pe=HASH(0x34ac700)') called at /usr/lib/perl5/ site_perl/5.8.8/PDF/API2/Resource/BaseFont.pm line 121 [Wed Oct 17 13:05:28 2007] v2rep.pl: PDF::API2::Resource::BaseFont::descrByData('PDF::API2::Resource::CIDFont::Tr u eType=HASH(0x34ac700)') called at /usr/lib/per l5/site_perl/5.8.8/PDF/API2/Resource/CIDFont/TrueType.pm line 84 [Wed Oct 17 13:05:28 2007] v2rep.pl: PDF::API2::Resource::CIDFont::TrueType::new('PDF::API2::Resource::CIDFont::T r ueType', 'PDF::API2::Basic::PDF::File=HASH(0x2 aaaaf5c0170)', '/usr/lib/perl5/site_perl/5.8.8/PDF/API2/fonts/MyriadPro-Bold.otf') called at /usr/lib/perl5/site_perl/5.8.8/PDF/API2/Resource/CIDFont/TrueType.pm l ine 130 [Wed Oct 17 13:05:28 2007] v2rep.pl: PDF::API2::Resource::CIDFont::TrueType::new_api('PDF::API2::Resource::CIDFon t ::TrueType', 'PDF::API2=HASH(0x2aaaaf5c0110)', '/usr/lib/perl5/site_perl/5.8.8/PDF/API2/fonts/MyriadPro-Bold.otf') called at /usr/lib/perl5/site_perl/5.8.8/PDF/API2.pm line 1613 [Wed Oct 17 13:05:28 2007] v2rep.pl: PDF::API2::ttfont('PDF::API2=HASH(0x2aaaaf5c0110)', 'MyriadPro-Bold.otf') called at v2rep.pl line 193