2

Today we can see that new PDVisibleSignDesigner object can be created by giving an image as input, which will be later displayed in the PDF document.

new PDVisibleSignDesigner(String filename, InputStream imageStream, int page)

If one passes green checkmark image (Ref: imageStream param), that makes perfect sense when your signature is valid. But today, even if your signature is not valid, it displays the same image. But logically, one would like to display different image, for e.g. some red cross mark.

How can we accomplish it using pdfbox api (I am using version 2.0.8) ?

Amedee Van Gasse
  • 7,280
  • 5
  • 55
  • 101
Abhishek Dadhich
  • 321
  • 2
  • 10
  • 2
    Such variable graphics have been deprecated more than a decade ago; Adobe Reader probably still supports them but there is no telling for how long. Depending on your signature profile they actually are forbidden. Please use a neutral graphic (no check mark, no cross, no question mark icon) for your signature and determine the validation state from the signature tab of the PDF viewer. – mkl Dec 12 '17 at 06:19
  • 1
    Your question is not about iText so I removed the tag. Please do not abuse irrelevant tags, this is considered spamming behavior. – Amedee Van Gasse Dec 12 '17 at 08:41
  • @mkl your comment is an answer :-) – Tilman Hausherr Dec 12 '17 at 11:31
  • @Tilman essentially yes. I would like to add some references for the facts presented in there, but they are difficult to collect while being only on a smart phone... ;) – mkl Dec 12 '17 at 16:42
  • Ok, I made it an answer and will add references later. – mkl Dec 12 '17 at 16:49

1 Answers1

5

Such variable graphics have been deprecated more than a decade ago; Adobe Reader probably still supports them but there is no telling for how long. Depending on your signature profile they actually are forbidden!

Please use a neutral graphic (no check mark, no cross, no question mark icon) for your signature and determine the validation state from the signature tab of the PDF viewer.


As it turns out after a bit of searching, I had already answered a similar question a year ago and included the relevant references in there. Thus, I marked this question a duplicate of that older one.

Some notes, though:

  • The answer contains a link to "Adobe Acrobat 9 Digital Signatures, Changes and Improvements" (Updated for Adobe Acrobat and Adobe Reader 9.1), an Adobe Technical Whitepaper dated 1 April 2009. Adobe seems to have removed that paper from its site, though, but copies can be found elsewhere.

  • The answer does not illuminate the situation in ISO 32000-2 as that part 2 has only been published 2017, this year. But just like in part 1, there is no mentioning of those "layers" n1, n3, and n4 in it either.

mkl
  • 90,588
  • 15
  • 125
  • 265
  • good point, I would really like to review the references to finally remove the images of my pdfs! – pedrofb Dec 12 '17 at 17:44
  • I'll look into that. – mkl Dec 12 '17 at 19:51
  • Cf. [this answer](https://stackoverflow.com/a/40391641/1729265) to a question which I meanwhile marked your question a duplicate of. It contains the references. – mkl Dec 12 '17 at 22:39