Example usage for com.lowagie.text.rtf.headerfooter RtfHeaderFooter DISPLAY_ALL_PAGES

List of usage examples for com.lowagie.text.rtf.headerfooter RtfHeaderFooter DISPLAY_ALL_PAGES

Introduction

In this page you can find the example usage for com.lowagie.text.rtf.headerfooter RtfHeaderFooter DISPLAY_ALL_PAGES.

Prototype

int DISPLAY_ALL_PAGES

To view the source code for com.lowagie.text.rtf.headerfooter RtfHeaderFooter DISPLAY_ALL_PAGES.

Click Source Link

Document

Constant for displaying the header/footer on all pages

Usage

From source file:net.sf.eclipsecs.ui.stats.export.internal.RTFStatsExporter.java

License:Open Source License

private void createHeaderAndFooter(Document doc) {
    Paragraph p = new Paragraph("Checkstyle statistics", pageHeaderAndFooterFont);
    p.setAlignment(Element.ALIGN_CENTER);
    HeaderFooter header = new RtfHeaderFooter(p);
    doc.setHeader(header);/*  ww  w.ja v  a  2 s.c o  m*/

    SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
    p = new Paragraph("Gnr le : " + simpleDateFormat.format(new Date()), pageHeaderAndFooterFont);
    p.setAlignment(Element.ALIGN_CENTER);
    RtfHeaderFooterGroup footer = new RtfHeaderFooterGroup();
    footer.setHeaderFooter(new RtfHeaderFooter(p),
            com.lowagie.text.rtf.headerfooter.RtfHeaderFooter.DISPLAY_ALL_PAGES);
    doc.setFooter(footer);
}

From source file:ro.nextreports.engine.exporter.RtfExporter.java

License:Apache License

private void buildFooter() throws DocumentException, QueryException {
    footer = buildRtfTable(PRINT_PAGE_FOOTER);
    if (footer == null) {
        return;/*from   ww w.  ja  va 2 s  .  com*/
    }
    printPageFooterBand();
    RtfHeaderFooterGroup footerGroup = new RtfHeaderFooterGroup();
    RtfHeaderFooter hf = new RtfHeaderFooter(footer);
    footerGroup.setHeaderFooter(hf, RtfHeaderFooter.DISPLAY_ALL_PAGES);
    document.setFooter(footerGroup);
}