pdfBox - 签名有效性复选标记在 Acrobat 阅读器中不可见 [英] pdfBox - Signature validity checkmark not visible in Acrobat reader

查看:32
本文介绍了pdfBox - 签名有效性复选标记在 Acrobat 阅读器中不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此作为参考向 pdf 添加视觉签名 - 第 8 页:

有效性仍显示在文档的签名可视化中,但用于可视化状态的图形现在由 Adob​​e Acrobat 本身生成.只是为了兼容旧文档,它们自己的有效性外观继续使用这些自定义外观显示.

在 Adob​​e Acrobat 版本 9 中,Adobe 最终不再使用文档内签名有效性可视化,参见.

因此,由于 Acrobat 9 Adob​​e 仅在签名面板中显示自己的图标,而不是文档本身,因此需要业务用户通过检查签名面板来评估签名有效性并相应地生成签名.

仅出于兼容性原因,具有其自身有效性外观的旧文档仍继续使用文档区域内的那些自定义外观显示.

弃用 ISO 32000-1

2008 年 7 月 1 日st 的官方 PDF 规范 ISO 32000-1 没有指定 PDF 可以为签名有效性提供可视化的任何方式.查看 ISO 32000-1 的副本由 Adob​​e 共享,没有提到那些层";n1n3n4.实际上根本没有提到这样的层,ISO 规范期望一个没有变体的普通单一外观流.

弃用 PAdES

PAdES 第 6 部分(<块引用>

符合要求的签名处理程序不应在页面内容中显示签名验证的结果.

(第 6 部分 - AdES 签名验证的可视化表示)

因此,通过添加那些层"n1n3n4 到 PDF 中的签名,您强制 Adob​​e Reader 充当不符合 PAdES 的签名处理程序,这可能会取决于您的特定安全环境.

...并根据 ISO 32000-2:2017:禁止

根据更新的 PDF 规范 ISO 32000-2,甚至禁止在文档中显示签名有效性:

<块引用>

PDF 处理器不应将签名的验证状态(例如,通过的复选标记或失败的 X)合并到签名字段的外观中.

(ISO 32000-2 第 12.7.5.5 节 — 签名字段)

I am adding a visual signature to a pdf using this as reference - https://stackoverflow.com/a/27940667/7103795

I am able to print the details properly. But the pdf does not display a green tick when opened in Acrobat though it is written "Signed and all signatures are valid." in the signature panel.

This is an example of what I need:

How can I ensure that the validity sign show up?

I am using pdfBox version 2.0.1

解决方案

In-document visualisations of the signature validity have been deprecated nearly a decade ago. Adobe Reader supports them for backward compatibility reasons only but they have never been part of the iso pdf specification.

The OP in a comment asked for documentation on this; this answer focuses on that.


Deprecation in respect to Adobe Acrobat

In Adobe Acrobat version 6 Adobe moved away from creating PDFs with in-document signature validity visualizations provided by the PDF itself, cf. Digital Signature Appearances page 8:

The validity was still shown in the signature visualization in the document but the graphics for visualizing the state were now generated by Adobe Acrobat itself. Only for compatibility old documents with their own validity appearances continued to be displayed using those custom appearances.

In Adobe Acrobat version 9 Adobe eventually moved away from using in-document signature validity visualizations, cf. Adobe Acrobat 9 Digital Signatures, Changes and Improvements page 10:

Thus, since Acrobat 9 Adobe displays its own icons only in the signature panel, not the document itself, and requires evaluation of signature validity by business users by inspecting the signature panel and generates signatures accordingly.

Only for compatibility reasons old documents with their own validity appearances still continued to be displayed using those custom appearances inside the document area.

Deprecation in respect to ISO 32000-1

The official PDF specification ISO 32000-1 dated July 1st 2008 does not specify any means by which a PDF can provide visualizations for signature validities. Have a look at the copy of ISO 32000-1 shared by Adobe, there is no mentioning of those "layers" n1, n3, and n4 anymore. Actually no such layers are mentioned at all, the ISO norm expects a usual single appearance stream without variants.

Deprecation in respect to PAdES

PAdES part 6 (ETSI TS 102 778-6 V1.1.1 on the "Visual Representations of Electronic Signatures") eventually requires

A conforming signature handler shall not display the result of the signature validation inside the page content.

(section 6 - The visual representation of AdES signature verification)

Thus, by adding those "layers" n1, n3, and n4 to a signature in a PDF, you force Adobe Reader to act as a not PAdES-conforming signature handler which might be a show stopper depending on your specific security environment.

... and according to ISO 32000-2:2017: Forbiddance

According to the updated PDF specification ISO 32000-2, in-document visualisations of the signature validity even are forbidden:

A PDF processor shall not incorporate the validation status of a signature (e.g. a checkmark for passed or an X for failed) into the appearance of the signature field.

(ISO 32000-2 section 12.7.5.5 — Signature fields)

这篇关于pdfBox - 签名有效性复选标记在 Acrobat 阅读器中不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆