[英]multiple signatures invalidate first signature in iTextSharp pdf signing
I'm having an issue with iTextSharp. 我在使用iTextSharp时遇到问题。 I have a document with form fields and I have fields already generated for signatures.
我有一个带有表单字段的文档,并且已经为签名生成了字段。 When the first person signs the document it works fine.
当第一个人在文档上签名时,它可以正常工作。 Adobe Reader shows a valid signature.
Adobe Reader显示有效的签名。 When I have a second person sign the document, Adobe Reader shows that signature 1 is now "Signed by Unknown" and the signature is invalid.
当我第二人对文档签名时,Adobe Reader显示签名1现在为“未知签名”,并且签名无效。 Adobe reader shows:
Adobe Reader显示:
There are errors in the formatting or information contained in this signature (support information: SigDict /Contents illegal data)
此签名中的格式或信息有误(支持信息:SigDict / Contents非法数据)
The project works to perform the signing as far as iTextSharp is concerned. 就iTextSharp而言,该项目将执行签名。 There are no errors or exceptions.
没有错误或例外。 documents with only 1 signature are not an issue.
仅带1个签名的文档不是问题。 The signing code is all based on the Answer's cut-down code from this article: ITextSharp SetVisibleSignature not working as expected
签名代码全部基于本文中Answer的缩减代码: ITextSharp SetVisibleSignature无法正常工作
The most up-to-date version of iTextSharp I can use is 5.5.6. 我可以使用的iTextSharp的最新版本是5.5.6。 5.5.7 has a bug referenced by the linked article.
5.5.7有一个链接文章引用的错误。 I have tried downgrading this project to 5.5.5, 5.5.4 and 5.4.2 and I'm getting the same results.
我曾尝试将该项目降级为5.5.5、5.5.4和5.4.2,但得到的结果相同。 Does anyone have any suggestions on how to troubleshoot why Adobe Reader is considering the Rev. 1 signature to be invalid after the Rev. 2 signature is applied?
在使用Rev. 2签名后,是否有人对如何解决Adobe Reader认为Rev. 1签名无效的问题有任何建议?
Good thing you asked. 你问的好东西。 I started going through the code to mock up a sample without any sensitive data and stumbled upon a stamper that was injecting form field data and not using append mode.
我开始遍历代码以模拟没有任何敏感数据的样本,并偶然发现了一个正在注入表单字段数据且未使用追加模式的压模。 That is what was trashing it.
那就是在浪费它。 My bad.
我的错。 FYI, the sample signing code from the linked article works great.
仅供参考,链接文章中的示例签名代码非常有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.