Discussion:
[iText-questions] Setting different header footer in one document
amol borate
2015-03-09 15:48:23 UTC
Permalink
Hi all,
I have one report which is having report header and page header. I want to
create PDF using I text api and need to set report header and page header
on first page only. On second page I will need page header n page footer.
On third page I need page header and page footer along with report footer.
So how to achieve this? I have used I text APIs before to set only page
header n footer in one document before. Plz help.
iText mailing list
2015-03-11 17:55:37 UTC
Permalink
Post by amol borate
Hi all,
I have one report which is having report header and page header. I
want to create PDF using I text api and need to set report header and
page header on first page only. On second page I will need page header
n page footer. On third page I need page header and page footer along
with report footer. So how to achieve this? I have used I text APIs
before to set only page header n footer in one document before.
What have you tried?
Surely you are using page events to add a header. In that case, it's
just a matter of adding:

if (writer.getPageNumber() == 1)
// code to add one header
else
// code to add another header

Isn't it?

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
iText-questions mailing list
iText-***@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
Loading...