Mudrit
Reference

SignConfig

Every SignConfig field and every SignConfigBuilder method, with defaults — the configuration for sign_pdf

Part of mudrit-pdfsign

SignConfig is the configuration passed to sign_pdf (and sign_file, sign_pdf_reported). Build it with SignConfig::default() for the classic single-box appearance signature, or fluently with SignConfig::builder(). SignConfig is #[non_exhaustive] — always construct it through Default or the builder, never a struct literal.

Fields

Prop

Type

Two different defaults for placements

SignConfig::default() seeds placements with one box: vec![Placement::new(PageSelector::First, [350, 60, 560, 160])] — a ready-to-sign default. SignConfig::builder(), by contrast, starts with an empty Vec — you must call .place(...) / .placement(...) at least once before signing, or the document gets no signature box at all.

SignConfig also exposes fn ltv_effective(&self) -> LtvPolicy — the effective policy: an explicit ltv_policy wins; otherwise it derives from ltv (trueBestEffort, falseOff).

SignConfigBuilder

Fluent builder returned by SignConfig::builder(). Set only what you need — the rest take the builder's minimal defaults (a single visible approval signature, no timestamp, no LTV, the layered "trust icon" appearance, SigSize::Auto).

let cfg = SignConfig::builder()
    .place("L", [350, 60, 560, 160])?       // page selector + box
    .certify(Certify::FormsAndSignatures)    // omit for an approval signature
    .timestamp(Timestamp::url("http://timestamp.comodoca.com"))
    .ltv(true)                               // value setters — pass a computed bool too
    .trust_icon(true)
    .reason("Approved")
    .build();

Prop

Type

Next

On this page