Mudrit
Guides

Multi-signature

Single, MultiShared, and MultiChained layouts, plus multi-party re-signing that keeps every prior signature valid

Part of mudrit-pdfsign

Two different questions hide behind "multi-signature":

  1. One signer, several boxes — how should one signature be laid out across pages? That's the Method.
  2. Several signers, over time — how does a second party sign a document the first already signed? That's re-signing, which sign_pdf handles automatically.

Method — laying out one signing operation

Method decides how the field(s) created in a single sign_pdf call relate to the actual cryptographic signature value:

MethodResultRevisions
Single (default)ONE signature, a clickable widget on every resolved pageone
MultiSharedN separate fields sharing one signature value (Adobe shows N "Rev 1")one
MultiChainedN independent signatures, each its own revisionN (rev1 → revN)
use mudrit_pdfsign::prelude::*;

let cfg = SignConfig::builder()
    .place("A", [40, 40, 200, 100])?     // a box on every page
    .method(Method::Single)              // one signature, shown on all of them
    .build();

Which one?

Use Single for the usual "sign once, show the stamp on every page" case — one signature, one revision, the lightest file. Use MultiShared when you want several distinct fields to reference the same signing act (e.g. an initials box and a full stamp) in a single revision. Use MultiChained only when you genuinely need N independent signatures in one call, each as its own revision — it is approval-only (certification is ignored for it).

Multi-party re-signing

You don't choose "sign" vs "add signature" — sign_pdf detects it. If the input is already signed, it appends a new signature as an incremental revision, so the existing signatures stay valid, instead of a fresh sign that would rebuild and break them.

let once  = sign_pdf(&pdf,  &signer_a, &cfg)?;   // signer A — first signature
let twice = sign_pdf(&once, &signer_b, &cfg)?;   // signer B — auto-appended; both valid

This works on plain and password-protected documents. When the already-signed input is also encrypted, pass the open password and the appended revision is encrypted with the document's own file key — so the output stays protected under the same password and cipher:

let resigned = sign_pdf(PdfReader::from(signed_protected).password("asd"), &signer_b, &cfg)?;

See the resign_multiparty example (signer A then B, plain and protected).

Certified variants

Certification composes with the layout methods. A certified Single signature shows one entry in Adobe's Signatures panel; a certified MultiShared shows N entries that share the one signature value. Both keep DocMDP validity, and either can be combined with output encryption (see the certified_variants example — certified Single, certified MultiShared, and encrypted).

Certification is first-only and not chained

A certifying signature must be the first signature, and MultiChained is approval-only — so certify with Single or MultiShared, then let later parties append approval signatures.

Next

On this page