Quoting Andrew McLaughlin <[EMAIL PROTECTED]>:

> Here's a fun one. I am using PdfContentByte to compose the entire PDF 
> now and things are back on track. However, I find there are some things 
> I need to right justify.

You can add text with a alignment PdfContentByte.ALIGN_RIGHT
http://www.lowagie.com/iText/tutorial/ch10.html#text
(but you probably knew this, I only mention it for completeness)

> How do I calculate the length, in pixels, for 
> a string of text, in a certain font, point size etc? Is there a 
> seperate font metrics class?

You can measure text with method BaseFont.getWidthPoint
http://www.lowagie.com/iText/tutorial/ch09.html#measuringtext

Bruno


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to