The template only has the y value. I think there's an example in the
tutorial for the page x of y.

Best Regards,
Paulo Soares

----- Original Message -----
From: "Marc Lustig" <[EMAIL PROTECTED]>
To: "'Paulo Soares'" <[EMAIL PROTECTED]>; "'iText list'"
<[EMAIL PROTECTED]>
Sent: Tuesday, July 29, 2003 19:39
Subject: AW: [iText-questions] how to avoid building the footer on each
onEndPage call ?


Thanks for the tip. The issue is the "page x of y" problem.
So filling the template in the end doesn't work because the x value is
different on each page. I found no other solution than using a static
accessor to store the template and recall it in onEndPage().

My suggestion to you iText-developers would be to introduce a simple
HashMap member into class Document along with getTemp() setTemp()
methods.
With this it would be more convenient to work with the event-methods.

Regards
Marc

> -----Ursprüngliche Nachricht-----
> Von: Paulo Soares [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 29. Juli 2003 17:29
> An: Marc Lustig; 'iText list'
> Betreff: Re: [iText-questions] how to avoid building the
> footer on each onEndPage call ?
>
>
> The way to do it depends on the logic of your program. A
> suggestion would be to create the template after opening the
> document and add it to the pages in onEndPage. The template
> content can be filled any time before closing the document.
>
> Best Regards,
> Paulo Soares
>
> ----- Original Message -----
> From: "Marc Lustig" <[EMAIL PROTECTED]>
> To: "'iText list'" <[EMAIL PROTECTED]>
> Sent: Tuesday, July 29, 2003 15:18
> Subject: AW: [iText-questions] how to avoid building the
> footer on each onEndPage call ?
>
>
> Paulo, I'm not quite sure about your idea. Would you advise
> me please how to access the template object that I generated
> from within
> onEndPage() ? I. e. how can I call cb.addTemplate(template,
> x, y); without having the template available? Is there
> anything that I overlooked, or is this needed to be
> implemented individually throu static accessors?
>
> Regards
> Marc
>
> > -----Ursprüngliche Nachricht-----
> > Von: Paulo Soares [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 28. Juli 2003 13:06
> > An: Marc Lustig; iText list
> > Betreff: Re: [iText-questions] how to avoid building the footer on
> > each onEndPage call ?
> >
> >
> > You can put your footer in a template and set that template in
> > onEndPage.
> >
> > Best Regards,
> > Paulo Soares
> >
> > ----- Original Message -----
> > From: "Marc Lustig" <[EMAIL PROTECTED]>
> > To: "iText list" <[EMAIL PROTECTED]>
> > Sent: Monday, July 28, 2003 11:20
> > Subject: [iText-questions] how to avoid building the footer on each
> > onEndPage call ?
> >
> >
> > > Hi,
> > >
> > > I'm about to get started with an event-based footer.
> > > I've only got one question: how do you avoid creating the
> > same footer
> > > each and every time onEndPage is called? Is there a
> possibility to
> > > store a user object (such as a PdfPTable) into the
> document or the
> > > writer object so that this object can be retrieved in the
> onEndPage
> > > method? I couldn't find anything like storeTemp(). The only
> > solution
> > > that comes to my mind would be to retrieve the object via
> a static
> > > method. Any idea?
> > >
> > > Regards
> > > Marc
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email sponsored by: Free pre-built ASP.NET
> > sites including
> > > Data Reports, E-commerce, Portals, and Forums are available now.
> > > Download today and enter to win an XBOX or Visual Studio .NET.
> > >
> > http://aspnet.click->
> url.com/go/psa00100003ave/direct;at.aspnet_072303_
> > > 01
> > > /01
> > > _______________________________________________
> > > iText-questions mailing list [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > >
> >
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites
> including Data Reports, E-commerce, Portals, and Forums are
> available now. Download today and enter to win an XBOX or
> Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet
_072303_01
/01
_______________________________________________
iText-questions mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions





-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to