Sorry,

I will explain what I'm trying to do, because i think onEndPage is not a correct method to do this.

I need to put header ( using PdfPTable) in all pages of my reports to show some option about the report.

I'm using onEndPage to show the page number in pages and i thought that i could use onEndPage to show the headers whit the options.

But i can't access this options because, how you said, the instance how have the option is not the same that calls onEndPage.

My questions are, how can i do to access this option in onEndPage to do the header?? Do i need to put this in variable document, whose onEndPage use?? Or will i can�t do this using onEndPage?? If I can�t how can I do it??? 

Thanks

Paulo Soares <[EMAIL PROTECTED]> wrote:
Do you want me to guess about code that I never saw?


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fred
Sent: Tuesday, January 04, 2005 11:36 AM
To: [email protected]
Subject: RE: [iText-questions] Problems withs PdfPageEventHelper

Ok...
 
I was suspecting of this!!!
But, do you know as I could solve the problem??
Variable "test" needs to be modified in the method create()!!!
 
Thanks
 

Paulo Soares <[EMAIL PROTECTED]> wrote:
The instance that calls create() is not the same that calls onEndPage().
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fred
Sent: Monday, January 03, 2005 3:59 PM
To: [email protected]
Subject: [iText-questions] Problems withs PdfPageEventHelper

Hello
 
I�m trying to use a PdfPageEventHelper to write in top of all pages.
 
This is my code:
 
public class ReportTest extends PdfPageEventHelper {

 

public String test = "classVariable";

 

//create report
public void create() {
                        //here i create the document
                        test = "classVariableUpdate";

                        System.out.println("create: " + test);



 
public void onEndPage(PdfWriter writer, Document document) {
      //here i write in top of all pages
      System.out.println("onEndPage: " + test);

}

}
 
But, when i run this:
 

ReportTest report = new ReportTest();

report.create();

my report is create correctly, but i need to use the variable test in method "onEndPage" whith value "classVariableUpdate" and not with "classVariable". My log show this:

11:35:43,865 INFO  [STDOUT] create: classVariableUpdate

11:35:48,181 INFO  [STDOUT] onEndPage: classVariable

i dont know what happen.

Thanks

 

 

 


 

 

 

 
 

 
 


Yahoo! Acesso Gr�tis - Internet r�pida e gr�tis. Instale o discador do Yahoo! agora.


Yahoo! Acesso Gr�tis - Internet r�pida e gr�tis. Instale o discador do Yahoo! agora.

__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/

Reply via email to