Re: Embed fonts in PDF

Mike Meyers <mike.xtinction-/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.pdfapi2
Message-ID <[email protected]>
Ok. I'll upgrade the package and see what happens. 
Regarding to my other question, is there any good documentation written about this module? It works great, but it took way too long for me to figure how to get things done.

Thanks,
Mike

Alfred Reibenschuh <[email protected]> wrote:                                  -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA256
 
 hi!
 
 mike.xtinction wrote:
 > 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'),
 
 the right method to use is:
 
 $font = $pdf->ttfont(''.FONT_PATH.'ItRo____.ttf');
 
 this will embed the font for you.
 
 > Both of them throw a bunch of warning like this:
 > 
 > Argument "X" isn't numeric in array element at
 ...
 > 
 > (in both cases it goes on with the rest of alphabet letters...)
 > I'm using PDF::API2 version 0.57-1.
 
 the warnings you see are caused by a bug that has already been fixed
 in a later version.
 
 try upgrading to the latest (and greatest) cpan version.
 
 C
 
 fredo
 - --
 Schonmal davon gehoert, dass nicht jeder linux user gleich ein
 programmierer ist, der alles, was er selber braucht, auch selber
 programmiert, installiert, patched, hacked oder portiert?
 
 Urks?  Das ist doch nur eine Legende.....
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iD8DBQFG6p/CjKJMaHhpyr4RCGfgAJ9siJGYkXpO3Px5zADTff+KDbAKtwCfdYD7
 5721dNq/dlAc3FE74JLNA9Q=
 =exn/
 -----END PGP SIGNATURE-----
 
     
                       

       
---------------------------------
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.