I want a footer in my document in the form of:

        Page 1 of 6

        HeaderFooter footer = new HeaderFooter(new Phrase("Page"), new Phrase(" of 6"));
        footer.setBorder(Rectangle.NO_BORDER);
        footer.setAlignment(Element.ALIGN_CENTER);
        document.setFooter(footer);

Is this possible without hardcoding the total number pages?  i.e. is there a method to get the total number pages in a document?

Reply via email to