You're not the first to ask that and it's not possible without invalidating
the signature. In effect, for that to work you would need to sign the
signature itself a bit like an endless loop.
----- Original Message -----
From: "Luiz Kobayashi"
Sent: Thursday, July 06, 2006 10:38 PM
Subject: [iText-questions] How to edit the appearance of an existing
> Hello all,
> first of all, many thanks again to Paulo, who helped me a lot in my
> previous question.
> My next question is: How to edit the appearance of an existing digital
> signature? Is this possible?
> One thing that I want to do is to sign a pdf and display the digital
> signature in base64 in the n2 layer.
> The way I thought to do was:
> 1) Sign the pdf as shown in the tutorial
> 2) Read the signed pdf file and retrieve the signature bytes (thanks to
> Paulo who showed me how to do it!)
> 3) Get the n2 layer of the signature and change it.
> But when I try to do
> PdfReader reader2 = new PdfReader(baos.toByteArray()); // baos is the
> byte array where the signed pdf is stored
> PdfStamper stp2 = new PdfStamper(reader2, fout, '\0', true);
> PdfSignatureAppearance sap2 = stp2.getSignatureAppearance();
> I get a java.lang.NullPointerException whenever I try doing anything
> with sap2, like sap2.getLayer(2) or sap2.setLayer2Text().
> So, I was wondering what would be the right way to do, if there is one.
> Any help would be greatly appreciated.
> Thanks in advance,
> Luiz Kobayashi
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> iText-questions mailing list
> [email protected]
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo