PDFium Delphi Component Docs

AnalyzeSignatureRevisions method

Component: TPdf  ·  Unit: PDFium
Reconstructs the original incremental revision chain and classifies changes made after each embedded signature

Syntax

function AnalyzeSignatureRevisions: TPadesRevisionAnalysisReport;

Description

Reads the exact loaded source bytes, follows classic xref tables, xref streams, hybrid references, and /Prev links, then maps every signature ByteRange to the complete revision it covers

Later authoritative objects are classified as signatures, validation material, form fields, annotations, page content, document structure, metadata, active content, deleted objects, compressed objects, or unknown changes before the applicable DocMDP and FieldMDP policy is evaluated

Classification follows object ownership rather than annotation or field navigation links: widget /P and /Parent references cannot turn page content into a permitted annotation or field change under DocMDP

Payloads shared with page content retain that page context even when they also serve a form or annotation appearance; explicit object labels cannot override an authoritative page-content owner

Payloads shared by a form field and an annotation also retain applicable FieldMDP restrictions: an All lock rejects the edit, while an unresolved field owner under Include or Exclude makes the decision indeterminate

Object definitions present in revision bytes but absent from the authoritative xref are returned as suspicious shadow changes instead of being silently ignored

A later definition whose dictionary only re-serialises the prior one, with another key order, string escaping, number spelling or whitespace and no stream, is not a change; signature dictionaries are always reported

An update of the interactive form dictionary named by the catalog whose only difference is NeedAppearances is reported as a form-field change, allowed unless DocMDP is P=1: the flag only asks a processor to rebuild widget appearances from the field values, which is part of filling in forms (ISO 32000-1 Table 218 and Table 254); any other AcroForm change keeps its own classification

Result

TPadesRevisionAnalysisReport returns source status, aggregate status and risks, revision and signature counts, an error message, and one TPadesSignatureRevisionAnalysis record per signature

Each signature record contains its covered length and revision, DocMDP permission, FieldMDP action and field names, later revision count, risks, status, and object-level changes

Remarks

Example

var
  Report: TPadesRevisionAnalysisReport;
begin
  Report := Pdf1.AnalyzeSignatureRevisions;
  if Report.Status in [prasDisallowed, prasSuspicious] then
    ShowMessage('The signed document contains unsafe later revisions');
end;

See Also

ValidatePades Signature