Seed Values
SeedValue, SvDigest, and SvSubFilter — signature-field /SV constraints, and the Adobe caveat on mandatory entries
A signature-field seed value dictionary (/SV, ISO 32000-1 §12.7.4.5) is a set of constraints a
document author places on a signature field so a conforming signer / viewer enforces them. Attach one
with SignConfigBuilder::seed_value. See the Existing Fields & Seed Values
guide for the walkthrough.
Mudrit writes the /SV dictionary onto the field it creates; it does not itself refuse to sign
against an incompatible configuration — the constraints are for the consuming viewer or re-signer
to honour.
SeedValue
Debug + Clone + Default. All fields are public; construct with SeedValue { ..Default::default() }
and set what you need, or start from SeedValue::new(). Empty / None fields impose no constraint.
Each require_* flag sets the matching /Ff bit so the constraint is a hard requirement.
Prop
Type
new()
pub fn new() -> Self — an empty seed value (no constraints); equivalent to SeedValue::default().
use mudrit_pdfsign::prelude::*;
let cfg = SignConfig::builder()
.place("F", [350, 60, 560, 160])?
.seed_value(SeedValue {
subfilters: vec![SvSubFilter::EtsiCadesDetached], // advisory: prefer PAdES
reasons: vec!["Approved".into(), "Reviewed".into()],
timestamp_url: Some("http://timestamp.comodoca.com".into()),
..SeedValue::default()
})
.build();
# Ok::<(), mudrit_pdfsign::Error>(())Adobe caveat (empirically confirmed)
Two things make Adobe Acrobat / Reader treat the field as awaiting a compliant signature and therefore not list a signature you embed in the same pass in its Signatures panel — the signature stays valid; spec-compliant verifiers still read it:
- any
require_*flag (each sets an/Ff"required" bit), and digest_methods(emits/DigestMethod, an SV version-2 entry).
Adobe-safe advisory entries — subfilters, reasons, and an advisory
timestamp_url with require_timestamp = false — render and validate everywhere, Adobe included. So
for the common "sign now and hint constraints" case, use those and leave require_* /
digest_methods unset; reserve the mandatory constraints for producing a constrained empty
template that a future signer fills.
SvDigest
A digest a signer may use, as constrained by /DigestMethod. Debug + Clone + Copy + PartialEq + Eq,
#[non_exhaustive].
Prop
Type
pub fn pdf_name(self) -> &'static str — the PDF /DigestMethod name ("SHA256" / "SHA384" /
"SHA512").
SvSubFilter
An acceptable signature /SubFilter, as constrained by /SV. Debug + Clone + Copy + PartialEq + Eq, #[non_exhaustive].
Prop
Type
pub fn pdf_name(self) -> &'static str — the PDF /SubFilter name ("adbe.pkcs7.detached" /
"ETSI.CAdES.detached").