0

I'm merging two PDFs with digital signatures using PDFBox. However, the result is a pdf with the signatures in the document, but when opened in Acrobat Reader it shows that there aren't valid signatures as shown: enter image description here

How can I keep the signatures?

Walter Colchado
  • 337
  • 1
  • 6
  • 16
  • 4
    Signatures are used to authenticate that the PDF file is an original unmodified file. When you merge files, you've modified them, so they are no longer originals, and hence the signature is invalid, as it should be. You should remove the signatures to prevent the warning, and leave the merged PDF unsigned. – Andreas Feb 04 '19 at 21:24
  • @Andreas you might want to make that an actual answer. – mkl Feb 05 '19 at 05:52
  • 2
    @Walter for an overview of changes allowed to a signed document see [this answer](https://stackoverflow.com/a/16711745/1729265). Clearly changing the content (as done by merging with another document) is never allowed. – mkl Feb 05 '19 at 05:57
  • You may keep the visible signature image but not the digital signing part (checksums, certificate etc.) – Lonzak Feb 05 '19 at 09:12
  • 1
    @mkl Done. I included the link you provided too. – Andreas Feb 05 '19 at 16:30

1 Answers1

4

Signatures are used to authenticate that the PDF file is an original unmodified file.

When you merge files, you've modified them, so they are no longer originals, and hence the signature is invalid, as it should be.

You should remove the signatures to prevent the warning, and leave the merged PDF unsigned.

For an overview of changes allowed to a signed document see this answer.

Andreas
  • 154,647
  • 11
  • 152
  • 247