Daniele Dellafiore wrote: > Can anyone test it and tell us if the result is the same? Any advice > on what we are doing wrong?
Aargh! You are using document.add in a page event! Please do me a favor and read p434-435 of my book: The document passed to the onEndPage method is "A PdfDocument object, NOT the Document instance you're using to add content in the form of high-level objects." "Do NOT add content to this object; use this object for read-only purposes - for instance to get the margins of the current page." And to a lesser extent: Aargh! you are using Table instead of PdfPTable... I've written you a simple example that explains how to add a table as header/footer: http://1t3xt.info/examples/browse/?page=example&id=395 It's probably more complex than what you need, but please, I'd do (almost) anything to stop you using class Table. I've also written an example for the guy who claimed he needed help 'urgently' this morning and then didn't even reply to my counter-question (I guess his question wasn't as urgent as he pretended). Maybe this example can help you too: http://1t3xt.info/examples/browse/?page=example&id=396 If you wonder about the examples in the book, please have a look at this page: http://1t3xt.info/examples/browse/?page=toc&id=11 I'm sorry if my "Aarghs" offend you, but... but... the "Aargh" comes with the examples (and those examples should really help you getting on the right track). br, Bruno ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar
