I said:
>> I don't remember the exact nature of the problem, but as
>> soon as I find some time, I will have a look at it.

Paulo replied:
> This is not really a problem. The method is called before anything is
> writen and there's no way that it can guess what the user is going to
> do next.

And as always, Paulo is right:
when you trigger a newPage, iText first looks at the current page.
If there is nothing written to the current page, no new Page is added. 

In your case, you trigger a newPage just after a call to onStartPage.
In the onStartPage, you add some headers, so the current page is not
empty. A new page is added, instead of ignoring the newPage. 

The problem is: iText has no way of knowing if you added content to
the page in an onStartPage event or elsewhere. 

So you will just have to follow my advice and put everything in the
onEndPage. 

Bruno

_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to