2012-07-11 59 views
4

我一直在使用iTextSharp的在我的应用程序签名的PDF文件,并使用此代码我改编自Java示例iText的网站上的作品不错:签署PDF与iTextSharp的

PdfStamper stp = PdfStamper.CreateSignature(reader, outmemstream, ControlChars.NullChar); 
PdfSignatureAppearance sap = stp.SignatureAppearance; 
sap.SetCrypto(prvKey, new X509Certificate[] {sigCert, Repository.CAcertificate}, null, pdfSignatureAppearance.SELF_SIGNED); 
sap.Reason = "Just to proove I can sign!"; 

这工作OK直到iText 5.2.1版本,但在最近的5.3.0版本中,“SetCrypto”方法已被删除,我不能再签名了!任何想法,为什么它已被删除,什么可能是另一种方法签署新版本的PDF?

在此先感谢

回答

1

PDF签署已重构在iText的5.3.0和白皮书,目前正在写新的签名过程。最终版本应该在九月份发布。

你会找到更多的信息here

+0

谢谢,我会再升级之前等待最后的文件... – 2012-07-11 18:05:14