Op 25/09/2012 13:24, d347hm4n schreef:
> I appreciate that I am doing something wrong here as Itext should be able to
> handle the wrapping and how much space text may need on the page itself, but
> I am unable to figure out how to use it.
Can you try this with a different font? Do you get the same result?
I see that you create a Phrase without specifying a leading (leading = 
the space between the lines).
In this case, the default leading depends on the font size.
What is shown in your result looks like a text that is written using a 
leading = 0.
That's strange.

Also: what is 9? Is it a font size? In that case, you need more than 9 * 
numberOfLines because the font size is usually LESS than the height you 
need for each line.

There are some other oddities in your text. For instance: you are adding 
this text to an existing PDF making the assumption that it's an A4 page? 
What will happen if the existing PDF has a different size? What will 
happen when the PDF has pages of size A4, but a page origin that is 
different from (0 , 0)?

These are just some initial remarks. It would take too much time to deal 
with all possible issues.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to