Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Paulo Soares <psoares <at> consiste.pt>
Subject: Re: How to edit the appearance of an existing digitalsignature?
Newsgroups: gmane.comp.java.lib.itext.general
Date: Thursday 6th July 2006 22:07:39 UTC (over 11 years ago)
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.

Paulo

----- Original Message ----- 
From: "Luiz Kobayashi" 
To: 
Sent: Thursday, July 06, 2006 10:38 PM
Subject: [iText-questions] How to edit the appearance of an existing 
digitalsignature?


> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions



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
 
CD: 3ms