Posted on 2008-09-10 03:13:18-07 by lynn
Font Metrics in PDF::Reuse?

Just discovered this great package and what it can do for me. It is already very useful to me.

However, I wish I could tell up front (before printing a string in some font to the PDF file) how many pixels (or points) that string would measure. Something similar to getFontMetrics() or getLineMetrics() in Java.

Is there such a thing in PDF::Reuse?

If so, how do I accomplish this?

Also, is there a programmer's manual or API reference for PDF::Reuse?

Thanks,

Lynn

Direct Responses: 8778 | Write a response
Posted on 2008-09-11 00:42:19-07 by lynn in response to 8772
Re: Font Metrics in PDF::Reuse?
Answering myself, thanks to an answer I received from Grant Mclean:

The prStrWidth() function can tell you what length a string would be in the currently selected font face and size.

As for documentation, The embedded POD is pretty much it: http://search.cpan.org/perldoc?PDF::Reuse

Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.