Anyone have any ideas here? This is really holding me back right now!

Thanks.



Dominic Maricic wrote:
> 
> 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
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problems-with-getPageNumber-tp20822470p20859397.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
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
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Reply via email to