Hi,
I am generating pdf in java using itext. I want to display the different
headers on different pages. I'm using one single document and pages are
getting added to it at run time. I have got 5 servlets written to generate
the whole pdf. At start of every servlet i've written the code for header
the problem is when its get generated the header gets added to the one more
extra page.
to get clear idea i am including the eg below.
Eg 1-3 pages i want header1 to get display.
4-7 pages I want header2 to get display.
8-10 Pages I want header3 to get display
The actual output which i get is as follows.
2-4 header1
5-8 header2
9-10 header3
Even I used the page event method onStartPage for this, but same problem
continues.
Below is the code which i'm adding at start of each servlet.
HeaderFooter header = new HeaderFooter(
new Phrase("ABC", headfont), false);
header.setBorder(Rectangle.NO_BORDER);
header.setAlignment(Element.ALIGN_CENTER);
document.setHeader(header);
Please help me to resolve this issue.
Thanks.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/