pageFooter.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(65));
// add a horizontal line to set off the page footer
pageFooter.addElement(HorizontalLineElementFactory.createHorizontalLine(0, Color.BLACK, null));
final PageOfPagesFunction pageNofM = new PageOfPagesFunction();
pageNofM.setName("PAGE_N_OF_M");
pageNofM.setFormat("Page {0} of {1}");
report.addExpression(pageNofM);
final TextFieldElementFactory tff = new TextFieldElementFactory();
tff.setName("PageIndicator");
tff.setAbsolutePosition(new Point2D.Double(X4 + C4_WIDTH - 60.0, 50.0));