How to edit the appearance of an existing digital signature?
- From: Luiz Kobayashi <luiz.kobayashi (at) incor.usp.br>
- Date: Thu, 06 Jul 2006 18:38:11 -0300
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 easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions