Java class.. need to pass lotus domino document

Hi all,

I hope someone will attempt to help me with this.

I have a java agent which gets a handle on a notes document… I can pull values from this document etc etc.

I have a public class from iText to create my header and footers on the pdf this code will generate… however… I can not figure out how to pass the notes document to this new class.

early in my agent \

writer.setPageEvent(new EndPage());

calls\

public class EndPage extends PdfPageEventHelper{…

anyway to send the notes document to this class to continue processing?

Please help.

Cheers,

Mark.

PS. The code I am using can be found in this post

http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllFlatweb/1cbe860d484b91fe852573db0060a27a?OpenDocument

Subject: Java class… need to pass lotus domino document

Basically you have two Java classes: JavaAgent and EndPage.You have a java object in JavaAgent class which you need to pass on to the second class EndPage.

Well, I can see that, you are in control of source code for both of these classes. It’s very straight forward then. Declare a member variable in EndPage class to hold a Notes Document. And make sure you initialize this member variable, by way of a contructor - wherein you pass on Notes Document object from first class, while an object of EndPage class is being created.

Does that make sense?

public class EndPage extends PdfPageEventHelper {

lotus.domino.Document doc;

public EndPage(lotus.domino.Document d){

super();

doc = d;

}

public void onEndPage(PdfWriter writer, Document document) {

//use value from doc object here

}

}

And in the NotesAgent class pass on the Notes Document object:

writer.setPageEvent(new EndPage(docCon));

Regards

Litty Joseph

Subject: RE: Java class… need to pass lotus domino document

Thank you… that is what I needed.

Sadly nothing is straight forward in Java for me… this is my first attempt at doing anything with Java. I am basically building order confirmation OR invoices if you will in pdf format. Now that I got my headers and footers I am trying to dynamically populate a detail table that must completely fill in the space between the header and footer and when necessary start a new page. Pretty darn close… just cant get the next page working right.

if you wanna help finish this project and make a few bucks let me know at mark_mgl at yahoo dot com. :o)

Have a GREAT day!