Skip to content

Preserve existing digital signatures when signing already-signed PDFs (Incremental Save support) #2090

@luigismith

Description

@luigismith

Feature Title

Preserve existing digital signatures when adding new signatures (Incremental PDF Save)

Feature Description

When signing a PDF that was already digitally signed with another tool (e.g., Adobe Acrobat, Adobe Sign, DocuSign), the previous signature is invalidated or lost after OpenSign applies its signature.

Current behavior:

  • Upload a PDF that was previously signed with Adobe Acrobat or other e-signature tools
    • Sign it with OpenSign
      • The resulting PDF shows the OpenSign signature, but the previous signature is either missing or marked as invalid
        Expected behavior:
  • OpenSign should preserve all existing valid signatures
    • The new signature should be added incrementally without modifying the byte ranges covered by previous signatures
      • All signatures (both old and new) should remain valid and verifiable
        Technical Context:
        This issue is likely caused by the PDF library not supporting proper incremental saves. When a PDF is modified and saved, it rewrites the entire document instead of appending changes, which invalidates the cryptographic hash that previous signatures were computed against.

The solution would require:

  1. Implementing incremental PDF saving (appending new data without modifying existing content)
    1. Ensuring new signature placeholders don't alter byte ranges of existing signatures
    1. Supporting the PDF specification for multiple signature revisions
      Reference: Similar issue documented in pdf-lib #1271

What type of feature are you requesting?

Security / Compliance

Importance

Critical

Additional Context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I have searched the existing issues & discussions to make sure that this is not a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions