PDFium Delphi Component Docs

ValidatePadesTrustAsync method

Enterprise edition: link FPdfEnterprise with Lib\Enterprise on the search path; otherwise this method raises EPdfEnterpriseRequired; see the edition matrix

Component: TPdf  ·  Unit: PDFium
Validate PAdES signature trust on a worker thread and report the outcome through a callback

Syntax

function ValidatePadesTrustAsync(const Options: TPadesTrustValidationOptions; const Reply: TPadesTrustValidationReply): Boolean;

OptionsTPadesTrustValidationOptions. NetworkPolicy, CheckRevocation, CheckTimeStamps, UrlRetrievalTimeoutMs, an optional CancellationToken and an OnProgress handler. TPadesTrustValidationOptions.Default supplies a usable starting point
ReplyTPadesTrustValidationReply. Method called when validation finishes, as procedure(Sender: TObject; const Completion: TPadesTrustValidationCompletion) of object. A nil reply makes the call return False
ResultBoolean. True when the worker was started, which is not the validation result

Description

Trust validation can take seconds, particularly when the selected backend supports network retrieval and the options permit it. Running it on a worker keeps a user interface responsive where ValidatePadesTrust would block; the OpenSSL backend performs no online retrieval

The completion record carries the finished Validation result plus a Status, an ErrorMessage and ErrorClassName for a failed run, and a CancellationReason when the token stopped it - so a caller learns not only that it ended but also how

Completion.Validation.Signatures preserves the same RevocationReason, NativeRevocationError, TimeStampRevocationReason and NativeTimeStampRevocationError fields as synchronous validation. Signature and timestamp diagnostics remain independent; pcrrNone or zero on its own does not mean a revocation check passed

The document bytes are captured up front, which means the returned False also covers a document that is inactive or still loading progressively. Options.NetworkPolicy decides whether any network access is attempted at all

See Also

ValidatePadesTrust, ValidatePades, AnalyzeSignatureRevisions, SignPades