Monday, 15 March 2010

java - how to add user defined appearance icons using annotation on signed pdf in itext? or Is it possible? -



java - how to add user defined appearance icons using annotation on signed pdf in itext? or Is it possible? -

i trying add together "user defined appearance icons" on signed pdf. how implement issue? please help me prepare it. thanks.

creating annotation predefined icons easy. "annotation > annotation icons" in keywords list: http://itextpdf.com/themes/keyword.php?id=294

adding annotations signed pdf tricky part. in cases, impossible without breaking signature, more when mdp settings of signature prevent adding annotations. in case question unanswerable.

however, if mdp settings allow adding annotations, need add together annotation using pdfstamper in append mode. search manual on pdf , digital signatures keywords "append mode".

public void addannotation(string src, string dest) throws ioexception, documentexception { pdfreader reader = new pdfreader(src); pdfstamper stamper = new pdfstamper(reader, new fileoutputstream(dest), '\0', true); pdfannotation comment = pdfannotation.createtext(stamper.getwriter(), new rectangle(200, 800, 250, 820), "finally signed!", "bruno specimen has signed document", true, "comment"); stamper.addannotation(comment, 1); stamper.close(); }

possible alternative values "comment" "key", "note", "help", "newparagraph", "paragraph", , "insert".

java pdf annotations itext

No comments:

Post a Comment