0

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

shihabudheenk
  • 593
  • 5
  • 18
bigler
  • 9
  • 3
  • By "above digital signature" do you mean as part of the document? Or outside the document area? For questions like this a screen shot with an arrow pointing to what you mean can be of advantage. – mkl Jan 24 '21 at 15:00
  • Please see digital signature appearance in image in black color. Is it possible to modify text font color. I tried to change it in layer2 i m using itext 4.2.1 version – bigler Jan 25 '21 at 05:35
  • In which viewer is that? That doesn't look like anything itext ever added while signing... – mkl Jan 25 '21 at 05:41
  • Adobe acrobat reader dc version : 2020.013.20074 – bigler Jan 25 '21 at 06:10
  • Furthermore, you mention itext 4.2.1. That version has never used by the itextpdf people, so you use a version that may contain arbitrary changes wer cannot know. I haven't seen that text there with itext 2.1.7, also not with 4.2 or any 5.x. Maybe that text is a 'feature' of your 4.2.1. – mkl Jan 25 '21 at 06:10
  • Current Adobe Acrobat adds text like that outside the document, not in it. At least if you don't use pre-Acrobat-6 layers. I assume that after the explanations concerning `Acro6Layers = false` you don't use that anymore... – mkl Jan 25 '21 at 06:14
  • If acro6layer is true we wont get green tick mark and this text also disappears.if we make it false green tick appears with text "Document certified by xyz". I need to show both but with modified color size font. – bigler Jan 25 '21 at 06:44
  • You should have mentioned that in your question as that is an obsoleted option. If that text only pops up for `Acro6Layers = false`, that layer is designed by your pdf viewer (if it supports this deprecated feature at all). Furthermore, those viewers nowadays don't accept custom appearances in the pdf anymore, to prevent forgery. Thus, no, you cannot customize that text. – mkl Jan 25 '21 at 07:20

1 Answers1

0

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.

mkl
  • 90,588
  • 15
  • 125
  • 265