Hi Guys,

I've been using iText for years (using the latest version right now) and have 
had one problem that's occasionally occured. I finally sat down and tried to 
figure the problem out and here's my issue:

I generate a table of contents which is a combination of a few tables. I call 
document.getNewPage, then call write.getPageNumber() before I start writing the 
TOC and I call it right after. Then I subtract the two and add 1 (as the TOC 
could start and end on the same page) to figure out the total number of TOC 
pages. The problem is that every once in a while the last table print out very 
close to the end of the last page (but does not go over and no extra page is 
printed). When this happens writer.getPageNumber() returns the NEXT page number 
rather than the current page number the TOC is on.

To test this I also tried getting the end page number, call document.newPage() 
and getting the page number again. The times when the numbers come out ok there 
will be a difference of one page. When the problem occurs (table is close to 
end of the page), I'll get the same page number before and after the 
document.newPage() call, both are 1 higher than they should be. This screws up 
all my page numbering and my reordering later on as well.

Anyone have any ideas on this? It's been happening since back in the 1.x 
versions of iText (this is for Java).

Thanks,
 Dominic - [EMAIL PROTECTED]





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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