PDFium Delphi Component Docs

ValidatePades method

Component: TPdf  ·  Unit: PDFium
Inspects PAdES structures in the original PDF source bytes and reports structural compliance, detached CMS integrity, certificate binding and independent trust states

Syntax

function ValidatePades: TPadesValidationResult;

Description

Parses embedded signature dictionaries from the original loaded bytes, checks their structure for PAdES baseline compliance and keeps signature offsets separate from the expanded object-stream view used for catalogue and DSS lookup

Required signature entries are counted only at the top dictionary level so duplicate Contents, ByteRange, SubFilter, Filter or Type keys cannot be hidden by parser-selected values, whilst same-named keys in nested dictionaries and arrays remain independent

Signature discovery uses a linear lexical scan that skips stream bodies, strings, hexadecimal values and comments, decodes #xx name escapes, and remains independent of whether a nested dictionary appears before or after the signature entries

The excluded /ByteRange gap must equal the complete direct hexadecimal /Contents token, including its delimiters, and every covered revision must end at a complete PDF revision boundary

On Windows, ordinary detached CMS signatures are verified directly against the two original /ByteRange segments, including CMS signed attributes, the cryptographic signature value and the SHA-256 signing-certificate-v2 binding

Each signer also receives an algorithm profile parsed from CMS and X.509 identifiers, with ISO/TS 32002 checks for supported NIST and Brainpool curves, Ed25519, Ed448, digest congruence, named-curve parameters and SHAKE256 output length

Remarks

Example

var
  Res: TPadesValidationResult;
begin
  if not Pdf1.Active then Exit;
  Res := Pdf1.ValidatePades;
  if Res.IsCryptographicallyValid then
    ShowMessage('PAdES signature integrity passed');
end;

See Also

SignPades PadesCryptoAvailable