Now im able to get the "page 1 of 10" ....I want to get this displayed in the
bottom of the page. I get it displayed in the header. I want them it the
bottom right corner. below is my onEndPage(). any help is appreciated.

public void onEndPage(PdfWriter writer, Document document) {
            PdfPTable table = new PdfPTable(2);
            try {
                
                table.setWidths(new int[]{48, 2});
                table.setTotalWidth(527);
                table.setLockedWidth(true);
               
table.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
                table.getDefaultCell().setBorder(Rectangle.NO_BORDER);
                PdfPCell c1 = new PdfPCell(new Phrase(String.format("Page %d
of", writer.getPageNumber()), subFontValue));
                c1.setHorizontalAlignment(Element.ALIGN_RIGHT);
                c1.setBorder(0);
                table.addCell(c1);
                c1 = new PdfPCell(Image.getInstance(total));
                c1.setBorder(0);
                table.addCell(c1);
                table.writeSelectedRows(0, -1, 34, 803,
writer.getDirectContent());
            }
            catch(DocumentException de) {
                throw new ExceptionConverter(de);
            }
        }

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/page-numbers-in-footer-tp4219499p4222862.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to