Hi Bruno,
Thanks a lot for your response to my earlier mail.
You are right in assuming I have to set a new Customer String for every Customer. The problem is
a) For each customer there may be more than two or three pages (just like Endpage example)
b) And every new customer record should begin at new page. (that's why document.newPage.)
To identify which customer details to use (from an ArrayList) for the header I thought I could use count as the customer number. But this count won't match with the page number (it will be always less).
That is why I felt there needs to be a synchronization between printing and OnEndPage event. You have suggested the use of member variable but which customer it is to be printed as header in current page that I must know. That I can get only from the
count .
I have also gone through the slideshow link you have provided and I understand the pdfwriter can be used to exchange info.
If there is any option like Pdfwriter.setPageNumber(int) and Pdfwriter.getPageNumber(), I can add the count in the pagenumber (for each count add 100, then get the pagenumber at OnEndPage event and divide by 100 to get count)..
With best Regards
Neil
"Bruno Lowagie (iText)" <[EMAIL PROTECTED]> wrote:
"Bruno Lowagie (iText)" <[EMAIL PROTECTED]> wrote:
Nilabhra Banerjee wrote:
> Hi Everybody,
>
> This is in continuation of my earlier mail.
I must have missed your earlier mail, but when I look at
the code below, I see you are creating a new EndPage()
object over and over again. Why?
I think you want a header with a different String for
every different customer. Why don't you declare this
String as a membervariable, and change it when needed.
Here is a similar example from Chapter 14:
http://itext.ugent.be/itext-in-action/examples/chapter14/SlideShow.java
The page transition and duration are added using a page event.
However, while we are creating the document, we change the
value of the transition and duration.
> for(count = 0; count < 2; count++){
> document.newPage();
> }
Note that document.newPage() doesn't do anything
if no content was added. This is also explained in Chapter 14:
http://itext.ugent.be/itext-in-action/examples/chapter14/EmptyPages.java
br,
Bruno
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
