itext java数字签名文本和边框颜色和 [英] Itext java digital signature text and border color and

查看:169
本文介绍了itext java数字签名文本和边框颜色和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请告诉我,我们如何使用java itext修改出现在数字签名上方的文本下方. 文本在图像中以黑色显示.

"xyz认证的文档"

我们如何更改文本,颜色和字体大小?

感谢

解决方案

在注释中,您澄清了使用不赞成使用的选项使PDF查看器在签名可视化中显示验证结果. (强烈建议您使用此选项;在当前的PDF规范-ISO 32000-2:2017中-禁止将签名的验证状态并入签名字段的外观;有关详细信息,阅读此答案.)

仅当使用此不建议使用的选项时,才使当前的Adobe Acrobat版本在签名外观中包括验证状态.否则,Adobe Acrobat将按原样显示签名.

在Acrobat 6之前的Adobe Acrobat版本中,也许可以在PDF本身中提供Acrobat用来表示签名验证状态的外观-我不确定,因为我开始只对此类详细信息感兴趣这些Acrobat版本已经过时了.

但是,如今,如果使用了不赞成使用的选项,则Acrobat会使用自己的符号和文本在签名外观中指示验证状态.例如,请参见此答案,其中PDF中包含的有效性未知符号是一个普通的问号,而Adobe Acrobat使用了类似的问题标记加一张脸.

第n4层中显示的Adobe Acrobat文本取决于其自身的喜好以及样式.

因此,如果您希望您的签名具有特定的外观,只需创建并提供该外观,包括任何绿色的勾号和文本,但不要激活已弃用的选项以使查看者添加任何外观. /p>

另一方面,如果您必须激活该不赞成使用的选项(例如,由于客户要求),请警告您的客户,此选项在PDF规范中未指定,并且对它的支持可能会更改,甚至会被删除.在即将进行的任何Acrobat更新中.此外,请注意,您对验证状态符号和文本的外观的影响是有限的.

Please let me know,how do we modify below text which appears above digital signature using java itext. Text is shown in black color in image.

"Document certified by xyz"

How do we change above text , color and font size ?

Thanks

解决方案

In comments you clarified that you use a deprecated option to make the PDF viewer display the validation result in the signature visualization. (Use of this option is strongly recommended against; in current PDF specifications - ISO 32000-2:2017 - it is forbidden to incorporate the validation status of a signature into the appearance of the signature field; for details read this answer.)

Only if you use this deprecated option, you make current Adobe Acrobat versions include the validation state in the signature appearance. Without that, Adobe Acrobat will display the signature as-is.

Maybe it was possible in Adobe Acrobat versions before Acrobat 6 to provide in the PDF itself the appearances for Acrobat to use to indicate the validation state of the signature - I'm not sure as I started to be interested in such details only when those Acrobat versions already were outdated.

Nowadays, though, Acrobat uses its own symbols and texts to indicate the validation state in a signature appearance if that deprecated option is used. For example see this answer where the validity unknown symbol contained in the PDF is a plain question mark but Adobe Acrobat uses a similar question mark plus a face instead.

The text Adobe Acrobat displays in the layer n4 is up to its own preferences, also the styling of it.

Thus, if you want your signature to have a specific appearance, simply create and provide that appearance, including any green tick marks and texts whatsoever, but don't activate the deprecated option to make the viewer add any appearance pieces.

On the other hand, if you have to activate that deprecated option (e.g. because of customer requirements), warn your customer/client that this is option is not specified in the PDF specifications and support for it may change or even be dropped in any upcoming Acrobat update. Furthermore, be aware that your influence on the appearance of the validation state symbols and texts is limited.

这篇关于itext java数字签名文本和边框颜色和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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