Signing using iText, Adobe Reader reports “Signature was created using Not available.”

纵饮孤独 提交于 2019-12-08 00:48:04

问题


I am successfully signing documents using iText. However, any time that I check the "Advanced Signature Properties" in Adobe Reader I see that the "Signature was created using Not available."

My question is, how can I use iText update this piece of information to then display properly in Adobe Reader or any other PDF reader?

EDIT #1:

An answer suggested using the PdfSignatureAppearance class's setSignatureCreator(String signatureCreator) (API and Source). This was not successful in updating the Signature Details in Adobe Reader. The result is the same as the screenshot included above.

Here is the exact code:

signer.getSignatureAppearance().setSignatureCreator("iText 7.0.2");


回答1:


You can specify the signature creator using the SignatureAppearance.setSignatureCreator(String signatureCreator) method. You can get the SignatureAppearanceof the signature by using signatureAppearance = pdfSigner.getSignatureAppearance(), with pdfSigner the PdfSignerobject used to create the signature in question.




回答2:


Just for reference (and for people using different libraries like PdfBox or older *Text versions). Adobe is using the Prop_Build dictionary for this. The App dictionary defines the following two attributes, which are concatenated:

  • Name (e.g. "Adobe Acrobat Reader DC")
  • REx(e.g. "2017.009.20044")

More infos about the "Digital Signature Build Dictionary Specification" are strangely defined in a separate document.



来源:https://stackoverflow.com/questions/43983330/signing-using-itext-adobe-reader-reports-signature-was-created-using-not-avail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!