Itext java digital signature text and border color and

为君一笑 提交于 2021-01-29 09:25:07

问题


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 ?

Thanksenter image description here


回答1:


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.



来源:https://stackoverflow.com/questions/65868461/itext-java-digital-signature-text-and-border-color-and

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