// Create the paragraphs that will be used as footers
Paragraph titleFooter = new Paragraph("Multiple headers / footers example");
titleFooter.setAlignment(LwgElement.ALIGN_CENTER);
Paragraph leftFooter = new Paragraph("Page ");
leftFooter.add(new RtfPageNumber());
Paragraph rightFooter = new Paragraph("Page ");
rightFooter.add(new RtfPageNumber());
rightFooter.setAlignment(LwgElement.ALIGN_RIGHT);
// Create the RtfHeaderGroup for the footer and set the footers
// at the desired positions
RtfHeaderFooterGroup footer = new RtfHeaderFooterGroup();