Quoting Roberto Cipollini <[EMAIL PROTECTED]>: > I've implementes the PageEvents in my servlet and i use the OnStartPage > method. > It works fine and see my image on every page in a table added to the > document....but it works only for the first and only page. > From the second page to the end of the pdf file it seems that the > OnStartPage is ignored!
You have made two mistakes, a minor and a major one. The minor one, is that it's always better to use onEndPage for Headers and Footers. The major one, is that you use document.add in a page event instead of adding something to a PdfContentByte or adding objects at absolute positions. You should use a PdfPTable instead of a Table and you should add it at an absolute position (in your code you don't tell where the table should be added). Furthermore I would declare the PdfPTable and certainly the Image as a membervariable of you PageEvents-class and call it in the onEndPage method. The way you wrote it, isn't very performant. I hope these few remarks will help you on your way. br, Bruno ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
