From: [email protected]
To: [email protected]
Subject: How I can edit an annotation field?
Date: Tue, 7 Dec 2010 12:37:40 +0100








I created a PDF document that includes an element "PdfAnnotation.createStamp". 
Now, I need to update information of this field. How I can do?

The code to create the stamp:

PdfReader reader = new PdfReader("D:\\3-iText.pdf");
PdfStamper stamper = new PdfStamper(reader,            
            new FileOutputStream("D:\\3-iText.sello.pdf"), '\0', true);
stamper.addAnnotation(MakeStamp(stamper.getWriter(), 1, 80) , 1);
stamper.close();
.....



private PdfAnnotation MakeStamp(PdfWriter writer, int xpos, int ypos) {


stampImg = Image.getInstance(SIAUtils.readFromFile("D:\\app32.jpg", false));
Rectangle location = new Rectangle(xpos, xpos + stampImg.getDpiX(), ypos, ypos 
+ stampImg.getDpiY());

//Sello
pdfStamp = PdfAnnotation.createStamp(writer, location, "dataxxxx", "Approved");
stampImg.setAbsolutePosition(0, 0);
PdfAppearance app = PdfAppearance.createAppearance(writer,  
stampImg.getPlainWidth(), stampImg.getPlainHeight());
app.addImage(stampImg);
pdfStamp.setAppearance(PdfName.N, app);
pdfStamp.setAppearance(PdfName.NAME, app);
return pdfStamp;
}


Thanks.
                                          
------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

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