在 PDF 文档中,数字签名用于标识文档的签名者。数字签名通常会带有文档签名者的相关元数据信息。签署 PDF 文档时,Acrobat 会将整个文档的加密哈希值存储在 PDF 文档中。每当 Acrobat 应用程序打开此 PDF 文档时,都会计算该文档的哈希值并将其与此加密哈希值进行比较。如果值相等,则可充分确定该文档未经修改或更改。
下表显示了数字签名字段的必需值:
关键字 | 值 | 缺省值 |
---|---|---|
action_item | 字段 | 必需 |
action_name | 用于标识数字签名字段的唯一字符串。 | 必需 |
action_type | DIGSIG_FIELD | 必需 |
action_spec | 在 Acrobat 中将鼠标悬停在数字签名字段上方时要显示的字符串。 | 可选方法 |
action_range | Element_range | cell_range | Element_range |
action_instance | Single_instance | Single_instance |
以下设计脚本代码将创建数字签名字段。
示例:
! Create a Digital Signature Field
! The accumulated range box of the following elements
! define the Digital Signature field in the PDF document.
if ((level eq 1) and (color eq 9) and (type eq 3)) then
action_item = field
action_name = "Chief Engineer"
action_type = digsig_field
action_spec = "John Doe, P.E."
endif
上述设计脚本将创建以下数字签名字段。将鼠标悬停在该字段上方时,会显示文本字符串 (John Doe, P.E.)。