function AnalyzeSignatureRevisions: TPadesRevisionAnalysisReport;
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 pass page content off as a permitted annotation or field change under DocMDP
Payloads shared with page content keep 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, whilst 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 rather than 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 catalogue 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
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
Active to be TrueSourceStatus is pvssOriginalBytes for a retained file, memory buffer, custom stream, or completed progressive sourcepvssIncomplete and prasIndeterminateTransformParams dictionary is resolved through the xref of the revision the signature covers, so a later revision that redefines the object cannot change the recorded permissions; a DocMDP reference whose parameters are absent or cannot be resolved there, such as a member of an object stream, reports permission 2, the ISO 32000-1 default, and a FieldMDP reference reports pfmaUnknown because its Action is requiredprasIndeterminate rather than an allowed result
var
Report: TPadesRevisionAnalysisReport;
begin
Report := Pdf1.AnalyzeSignatureRevisions;
if Report.Status in [prasDisallowed, prasSuspicious] then
ShowMessage('The signed document contains unsafe later revisions');
end;