Thanks Paulo!

I changed VERISIGN_SIGNED to WINCER_SIGNED. That removed the plug-in message. Acrobat didn't recognize the Verisign root certificate until I changed the security settings to use all Windows root certificates. Does that jive with your experience?

I still can't get the signature graphic to display. Are there any rules for the image format, size, or color depth? No matter what I try, I don't see an image.

Thanks!

Carl


Paulo Soares wrote:
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carl H. Sayres
Sent: Friday, June 08, 2007 3:41 PM
To: [email protected]
Subject: [iText-questions] problems signing PDFs using a Verisign certificate

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.

Works for me using your code.

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.


Use PdfSignatureAppearance.WINCER_SIGNED. The verisign mode was for the
old Acrobat 5 plug-in and it's not needed anymore.

Paulo

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.SignatureRenderGra
phicAndDescription);
appearance.setSignatureGraphic(img);
appearance.setAcro6Layers(true);

appearance.setVisibleSignature(new Rectangle(97.51f,234.24f,378.38f,253.41f),4,null);
appearance.setCertificationLevel(PdfSignatureAppearance.CERTIF
IED_NO_CHANGES_ALLOWED);
appearance.setCrypto(key,chain,null,PdfSignatureAppearance.VER
ISIGN_SIGNED);
stamper.close();


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


------------------------------------------------------------------------

-------------------------------------------------------------------------
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/
-------------------------------------------------------------------------
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