i have changed code to use PDFStamper but still no success

                 Calendar currentDate   =       Calendar.getInstance();
                 SimpleDateFormat f     = new SimpleDateFormat("MM/dd/yyyy");
                 String signatureDate   =       f.format(currentDate.getTime());

                OutputStream newPDF     =       new FileOutputStream("New.pdf");
                PdfReader reader = new
PdfReader(getMethod.getResponseBodyAsStream());
                PdfStamper stamper = new PdfStamper(reader, newPDF);
                BaseFont font =
BaseFont.createFont("c:/windows/fonts/arial.ttf",       BaseFont.WINANSI,
BaseFont.NOT_EMBEDDED);
                PdfContentByte cb1 =    stamper.getOverContent(13);
                cb1.beginText();

                cb1.setFontAndSize(font, 12);
                cb1.moveText(400, 663);
                cb1.setColorFill(Color.BLACK);
                
                cb1.setRGBColorStroke(0xFF, 0x00, 0x00);
                cb1.setRGBColorFill(0xFF, 0xFF, 0xFF);
                cb1.showText(signatureDate);
                cb1.endText();

                reader.close();
                stamper.close();
                newPDF.close();

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Editing-existing-PDF-file-Newly-added-text-not-visible-tp3462037p3463480.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
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