RE: Embed fonts in PDF

"Mark Fowle" <mfowle-uVnJ9s0aRV+BUy7/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.pdfapi2
Message-ID <[email protected]>
Perl Graphics Programming from O'Reilly has one chapter on PDF::API2. I
started with that, it's not the best and a bit outdated but does have some
fully formed examples.

 

The Perldocs are helpful

http://search.cpan.org/dist/PDF-API2/

Esp:

http://search.cpan.org/dist/PDF-API2/lib/PDF/API2.pm

Exaples directory:

http://search.cpan.org/src/AREIBENS/PDF-API2-0.63/examples/

 

 

  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Mike Meyers
Sent: Friday, September 14, 2007 12:31 PM
To: [email protected]
Subject: Re: [perl-text-pdf-modules] Embed fonts in PDF

 

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.
<http://enigmail.mozdev.org> mozdev.org

iD8DBQFG6p/CjKJMaHhpyr4RCGfgAJ9siJGYkXpO3Px5zADTff+KDbAKtwCfdYD7
5721dNq/dlAc3FE74JLNA9Q=
=exn/
-----END PGP SIGNATURE-----

 

  

  _____  

Yahoo! Answers - Get better answers from someone who knows. Try
<http://uk.answers.yahoo.com/;_ylc=X3oDMTEydmViNG02BF9TAzIxMTQ3MTcxOTAEc2VjA
21haWwEc2xrA3RhZ2xpbmU>  it 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.