Ron Olson wrote:
>                       for (int j = 0; j != 300; ++j)
>                       {
>                               document.add(new Phrase("Aloha from beautiful 
> Waikiki Beach, in
> Honolulu Hawaii! Wish you were here!"));
>                       }

You're working with Phrase objects.
The problem doesn't occur when you are working with Paragraph objects. 
The nature of the problem is known, has been known for a long time, and 
we won't change this.
When you create a new document, and start with the first page, the 
"current leading" is equal to 0. This leading is taken into account 
every time a new page is initialized. So the first time initPage() is 
called, the "cursor" is moved 0 pt downwards (the leading is zero at 
that moment). When you start adding objects, the current leading 
changes. So when you arrive on the second and subsequent pages, more 
space is added than on the first page.
Just like it's not advised to start adding Chunks to a document; see:
http://1t3xt.info/examples/results/in_action/chapter04/fox_dog_overlapping_chunks.pdf
and
http://1t3xt.info/examples/browse/?page=example&id=45
It's not advised to start adding Phrases. Start with a Paragraph and the 
problem is solved.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to