THotPDF.SaveIncrementalUpdateAuthenticated Method
Authenticates signed revision policies, rejects prohibited changes, and atomically publishes an incremental update
Declarations
function SaveIncrementalUpdateAuthenticated(
const TargetFile: TFileName;
const Options: THPDFAuthenticatedIncrementalUpdateOptions;
out Info: THPDFAuthenticatedIncrementalUpdateInfo
): Boolean; overload;
function SaveIncrementalUpdateAuthenticated(
const TargetFile: TFileName;
out Info: THPDFAuthenticatedIncrementalUpdateInfo
): Boolean; overload;
Workflow
- Writes the pending incremental revision to a unique candidate in the target directory
- Loads every policy from the exact revision protected by its signature byte range
- Authenticates each policy-bearing CMS signature and optionally validates its certificate path
- Classifies every later revision and enforces DocMDP, FieldMDP, UR or UR3, Identity, and unknown-transform decisions
- Publishes the accepted candidate with a write-through atomic replacement
A rejection deletes the candidate and leaves an existing target byte-for-byte unchanged
Options
| Member | Purpose |
|---|---|
Authentication | ipaCryptographic requires a valid CMS byte-range signature, while ipaTrustedCertificate additionally requires cvsTrusted from certificate path and revocation validation |
RequireSignaturePolicy | Rejects documents without an authenticated transform policy when True, which is the default |
CertificateValidation | Trust anchors, intermediates, offline revocation evidence, validation time, purpose, and algorithm policy used by trusted-certificate mode |
Result details
THPDFAuthenticatedIncrementalUpdateInfo reports the final status, failing signature index, signature and certificate status, total signature count, authenticated policy count, and a diagnostic issue
Important statuses include aiusAccepted, aiusNoSignaturePolicy, aiusSignatureInvalid, aiusCertificateUntrusted, aiusPolicyMalformed, aiusPolicyViolation, and aiusCommitFailed
Usage
var
Info: THPDFAuthenticatedIncrementalUpdateInfo;
begin
PDF.BeginIncrementalUpdate('certified.pdf');
PDF.SetLoadedFormFieldValueByName('CustomerName', 'Ada');
if not PDF.SaveIncrementalUpdateAuthenticated('updated.pdf', Info) then
raise Exception.Create(String(Info.Issue));
end;
Security boundary
- A structurally present policy never becomes authoritative until its signature authenticates successfully
- Policy dictionaries are read from the signed snapshot and bound to the original signature object, byte range, and CMS value, preventing a later revision from redirecting or replacing its own authority
- Trusted-certificate mode is appropriate when signer identity matters in addition to document integrity
- The ordinary
SaveIncrementalUpdatemethod remains available for unsigned workflows that do not request policy enforcement