Fix digital signatures for NeedAppearance=true

Always write out the appearance streams for signatures. Several pdf readers can't create it

  • firefox pdf viewer
  • ghostscript
  • ourselves

Also, annotations without appearance streams are deprecated in pdf2.0.

Also, if appearance streams exists for a digital signature, don't regenerate it, as that results is an empty visual representation, and it might also fiddle with the signature valudation

It is not completely clear from the standard if this is 100% conforming behavior, but NeedAppearance should be set to true if some annotatinos are without appearance streams; it is not really described what should happen if NeedAppearances is true and some annotations are with appearance streams.

Edited by Sune Vuorela

Merge request reports