I'm having two problems signing PDFs using a Verisign certificate with 
iText 2.0.4.

1. I'm including an Image of the handwritten signature using 
setSignatureGraphic. The signed PDF that iText produces does not show 
the image, though.
2. When I open the signed document in Acrobat Reader 8, it tells me that 
"The validity of the document is UNKNOWN. The plug-in required is not 
available.". When I click on the signature field, it tells me that the 
Verisign.PPKVS plug-in cannot be found. I have searched on Verisign's 
web site with no luck in finding such a plug-in.

Any help with these two issues would be very appreciated.

Carl

ps. In case it helps. here is my code:

KeyStore ks = KeyStore.getInstance("pkcs12");
ks.load(new FileInputStream("C:/tt/csayres.pfx"),password.toCharArray());
String alias = (String)ks.aliases().nextElement();
PrivateKey key = (PrivateKey)ks.getKey(alias,password.toCharArray());
java.security.cert.Certificate[] chain = ks.getCertificateChain(alias);

PdfReader pdfReader = new PdfReader(new FileInputStream("C:/tt/in.pdf"));
FileOutputStream fos = new FileOutputStream("C:/tt/out.pdf");
PdfStamper stamper = PdfStamper.createSignature(pdfReader,fos,'\0');
PdfSignatureAppearance appearance = stamper.getSignatureAppearance();

Image img = Image.getInstance("C:/tt/csayres.png");
appearance.setRender(PdfSignatureAppearance.SignatureRenderGraphicAndDescription);
appearance.setSignatureGraphic(img);
appearance.setAcro6Layers(true);

appearance.setVisibleSignature(new 
Rectangle(97.51f,234.24f,378.38f,253.41f),4,null);
appearance.setCertificationLevel(PdfSignatureAppearance.CERTIFIED_NO_CHANGES_ALLOWED);
appearance.setCrypto(key,chain,null,PdfSignatureAppearance.VERISIGN_SIGNED);
stamper.close();

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to