PDFium Delphi Component Docs

BuildPadesEvidenceReport method

Component: TPdf  ·  Unit: PDFium
Builds one bounded evidence report across every PAdES signature and document timestamp in the retained original PDF

Syntax

function BuildPadesEvidenceReport(const Options: TPadesEvidenceReportOptions): TPadesEvidenceReport;

Description

Combines PDFium signature facts with CMS algorithm and policy inspection, certificate trust and revocation status, RFC 3161 timestamp status, DSS/VRI coverage, and incremental revision policy analysis

The method retains one immutable source-byte capture and reuses it across compliance, trust, DSS, and revision stages without resaving the document

Signer and ordered certificate-path identities are emitted as SHA-256 values rather than copying certificate bodies into the report

Options

Result

TPadesEvidenceReport includes validation and revision summaries, hashed DSS material records, VRI reference graphs, PDFium signature count, truncation state, and one TPadesSignatureEvidence per retained signature

ToJson emits a nested evidence document and ToCsv emits one row per retained revision change, or one summary row when a signature has no retained changes

TPadesSignatureEvidence.Validation preserves the signature's RevocationReason and NativeRevocationError independently of the timestamp's TimeStampRevocationReason and NativeTimeStampRevocationError

Revocation export fields

Each JSON entry in signatures includes revocationReason, nativeRevocationError, timeStampSignatureStatus, timeStampTrustStatus, timeStampRevocationStatus, timeStampRevocationReason, and nativeTimeStampRevocationError. Existing members and meanings are unchanged; the JSON format has no schema-version member, so consumers should read fields by name and tolerate additional members

CSV retains its original 40 columns in their original order and appends those same seven fields in the order listed above, for 47 columns total. Both summary rows and revision-change rows include the diagnostics; existing column positions remain unchanged. Readers should use the header names or tolerate additional trailing columns instead of requiring exactly 40 columns

Reason strings are none, certificateRevoked, crlExpired, crlNotYetValid, crlUnavailable, crlSignatureInvalid, crlInvalid, chainUntrusted, or unknown. Native errors are numeric backend-specific codes, such as OpenSSL X509 verification errors or raw Windows provider or GetLastError DWORD values, with zero meaning no native diagnostic. Windows values are exported unchanged and must not be interpreted as aggregate chain trust masks or a common HRESULT space

Use revocationStatus and timeStampRevocationStatus to determine the verdict. A reason of none or a zero error also occurs when checking is disabled, never reached, or lacks detailed backend diagnostics; exporting evidence does not perform an additional verification pass

Remarks

Example

var
  Options: TPadesEvidenceReportOptions;
  Report: TPadesEvidenceReport;
begin
  Options := TPadesEvidenceReportOptions.Default;
  Report := Pdf1.BuildPadesEvidenceReport(Options);
  TFile.WriteAllText('signature-evidence.json', Report.ToJson);
end;

See Also

ValidatePadesTrust AnalyzeSignatureRevisions