I am using PdfStamper to write some text a an exiting pdf but its not 
writting the text here is my code: Thanks in advance


// GET THE FILE
        PdfReader reader = new PdfReader("e:/Hello World 7.pdf");

        PdfStamper stamper = new PdfStamper(reader, baos);

        PdfContentByte cb = stamper.getUnderContent(1);

        // PdfTemplate
            PdfTemplate template = cb.createTemplate(500, 200);

        template.beginText();
            BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, 
BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
            template.setFontAndSize(bf, 12);
            template.setTextMatrix(100, 100);
            template.showText("SOME TEXT HERE");
            template.endText();

        cb.addTemplate(template, 0, 0);

        reader.close();

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement



_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to