Write a class (or add to your class) and extend PdfPageEventHelper.

Override the onEndPage. You need the rectangle (area) that you want to add the header or footer to, which you can calculate from the cropbox or similar.

Within there you can add anything you want, and it is called at the end of each page written automatically.

-AJ



On 3/14/2013 11:55 AM, Pedro Peixoto wrote:
Hi,

I'm building a repport for this java application in my company, and it should have a variable header on every page. The header structure itself does not change: It's a fixed table with a few columns and rows. What changes is the content of the cells.

For example: One of the cells has a Date (witch ilustrates the date of that page's content.). Other exemple might be a counter, which counts how many rows are in the current page.

I'd like some ideas on how to build a variable header for every page: Do I have to opt to build the header manually and do not use iText's Header? Another problem is: The content of the header can only be determined after all the content of the page has been added. Is there a way to "go back" to the header and modify some cells?

Thanks in advance,
Pedro Peixoto


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar


_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to