Hello. I'm trying to create a RTF document with headers and footers on every
page EXCEPT the first page.

The code below seems to force the left and right page headers and footers on
the first page.

    RtfHeaderFooterGroup header = new RtfHeaderFooterGroup();
    header.setType(RtfHeaderFooter.TYPE_HEADER);
    header.setHeaderFooter(new RtfHeaderFooter(tableHeader),
RtfHeaderFooter.DISPLAY_LEFT_PAGES);
    header.setHeaderFooter(new RtfHeaderFooter(tableHeader),
RtfHeaderFooter.DISPLAY_RIGHT_PAGES);
    document.setHeader(header);

    //footer group
    RtfHeaderFooterGroup footer = new RtfHeaderFooterGroup();
    footer.setType(RtfHeaderFooter.TYPE_FOOTER);
    footer.setHeaderFooter(new RtfHeaderFooter(tableFooter1),
RtfHeaderFooter.DISPLAY_LEFT_PAGES);
    footer.setHeaderFooter(new RtfHeaderFooter(tableFooter1),
RtfHeaderFooter.DISPLAY_RIGHT_PAGES);
    document.setFooter(footer);

Thank you!
-- 
View this message in context: 
http://www.nabble.com/Headers-and-footers-always-appear-on-all-pages-tp24068691p24068691.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
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
[email protected]
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/

Reply via email to