I can add that you don't call onStartPage directly. The event is registered
with writer.setPageEvent(my_event_class).

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Bruno [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, June 26, 2003 14:46
> To:   Roberto Cipollini
> Cc:   [EMAIL PROTECTED]
> Subject:      Re: [iText-questions] Image in the headerFooter of the pdf
> 
> 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


-------------------------------------------------------
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

Reply via email to