I see, but I ran into another little issue. Some of my pages are portrait
and some are landscape, so it doesn't look right on the landscape pages. Any
ideas?

int n = readermain.getNumberOfPages();
        BaseFont bf1 = BaseFont.createFont(BaseFont.HELVETICA,
BaseFont.CP1252,BaseFont.NOT_EMBEDDED);
        String pg = "";
        int fontsz = 8;
        

        for (int i = 1; i <= n; i++) {
            PdfContentByte cb1 = stamper.getOverContent(i);
            
cb1.setFontAndSize(BaseFont.createFont(BaseFont.HELVETICA,BaseFont.WINANSI,
BaseFont.NOT_EMBEDDED), fontsz);
            pg = "Page " + i;
            float len = bf1.getWidthPoint(pg, 8);
            cb1.beginText();
            cb1.setTextMatrix(280, 30);
            cb1.showText(pg);
            cb1.endText();
       }

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

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to