Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

pdf - Itext java digital signature text and border color and

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

"Document certified by xyz"

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

Thanksenter image description here

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...