Skip to main content
Troubleshooting4 min read

Why Is My PDF Signature 'Invalid'? What Breaks Signatures After Editing

An 'invalid signature' after an edit is the math working correctly. Here's which operations break it, why, and the order of operations that prevents it.

By BytesPDF Editorial TeamPublished Reviewed
Cracked wax-seal signature on a PDF page being altered by editing and compression arrows after signing

You compressed the contract to fit a portal, and now Acrobat shows a broken seal: signature invalid, document was modified. The natural reaction is "the tool broke my signature." The accurate one: you modified the document, and the signature is telling you so. Once that clicks, the problem becomes a scheduling question.

What a PDF signature actually seals

A PDF digital signature (PKCS#7/CMS) computes a cryptographic digest over a designated byte range of the file — for a whole-document signature, effectively every byte that makes the document what it is. The signature stores the digest of those exact bytes.

Verification recomputes the digest and compares. One flipped bit — and re-compression flips millions — and the comparison fails. The viewer reports the signature as invalid because the document is provably not the document that was signed. (Mechanics of the sealing itself: how to digitally sign a PDF.)

Operations that break PDF signatures: compression, merge, rotation, cleanup, re-save

The operation matrix

OperationRewrites file bytes?Effect on existing signatures
Compress / optimizeYes — image & object streamsInvalidates
Merge / split / reorder pagesYesInvalidates
Rotate pages (stored rotation)YesInvalidates
Remove metadata / hidden dataYesInvalidates
Password-protect / change permissionsYesInvalidates
Word/Excel → PDF exportNew file entirelyOld signature doesn't carry
Print-to-PDFNew file entirelyOld signature doesn't carry
View rotation, reading, printingNoSafe
Selecting/copying textNoSafe

This is why quality tools refuse the job instead of doing it quietly: BytesPDF's compress, rotate and clean workflows reject files with detected signatures rather than hand back a rewritten copy with a dead seal. If a tool offers to "preserve" your signature through a rewrite, be deeply suspicious — either it isn't rewriting what it claims, or the output's signature will fail on the recipient's side.

Invalid vs. untrusted: read the actual error

Signature panels distinguish states, and the fix differs:

  • "Document was modified after signing" / integrity failure → the bytes changed. Editing happened (even invisible re-saving). Fix: revert to the signed original, or make your edits and re-sign.
  • "Validity unknown / signer not trusted" → the math passed; the certificate isn't on the viewer's trust list (common with self-signed and some regional CAs). The signature is intact. Fix: exchange certificates out of band or use a CA-issued cert — covered in the trust section of how to digitally sign.
  • Malformed / broken signature data → rare; usually a bad intermediate tool's output. Re-sign from the clean document.

The fix, and the prevention

Fix: there is no re-glue. Only the private-key holder can restore a verification state — by signing the current document again. Anyone promising "signature repair" on changed bytes is describing forgery, not repair.

Prevention — the only order that works:

  1. Edit and finalize the content.
  2. Clean hidden data and metadata.
  3. Compress to the destination's limit — before signing, e.g. with the exact-size workflow.
  4. Set passwords and permissions if required.
  5. Sign the final bytes.
  6. Send the exact signed file — no "just one more save."

This spine is written out once, end to end, in send a contract as a secure PDF. Get the order right and the broken-seal dialog becomes someone else's problem — ideally, no one's.

Frequently asked questions

Why does my PDF signature show invalid after editing?

A PDF digital signature covers exact bytes of the file. Any post-signing rewrite — compression, merge, rotation, metadata cleanup, even a viewer's re-save — changes those bytes, so the integrity check correctly reports that the document changed after signing.

Can I compress a signed PDF without breaking the signature?

No. Compression rewrites image and object streams inside the signed byte range. Compress first, then sign the smaller file — the reverse order always invalidates. BytesPDF refuses files with detected signatures rather than producing broken output.

What's the difference between 'invalid' and 'untrusted'?

Invalid means the bytes changed (integrity failed) or the signature data is malformed. Untrusted/unknown means the signature is mathematically fine but the signer's certificate isn't on the viewer's trust list. Different problems, different fixes.

Can I restore a valid signature after editing?

Only by re-signing. The original private key holder must sign the edited document again — the old signature cannot be re-attached to different bytes.

Which edits are safe for a signed PDF?

None that rewrite the file. Annotations stored in ways the signer permitted via 'permitted changes' can sometimes be added by compliant tools without invalidating earlier signatures, but any tool that rewrites the file's streams will break it. Treat signed PDFs as read-only.