PDFium Delphi Component Docs

CompletePadesRemoteSignature 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
Completes a prepared PAdES remote-signing session without needing an active TPdf instance

Syntax

class function CompletePadesRemoteSignature(Prepared, Dest: TStream; const Request: TPadesRemoteSigningRequest; const CmsDer: TBytes): Boolean; static;

Description

Recomputes the complete prepared-PDF fingerprint and the detached document digest with the algorithm the request records, verifies the saved ByteRange and unused placeholder, validates the returned CMS shape and message-digest binding, and fills the reserved hexadecimal slot without changing any signed byte

All request and CMS checks complete before the destination stream is cleared or written

Parameters

PreparedExact placeholder PDF produced by PreparePadesRemoteSignature
DestDestination stream for the completed signed PDF
RequestOriginal or deserialised remote-signing request
CmsDerComplete detached CMS SignedData DER returned by the remote signer

Remarks

Example

var
  Prepared, Output: TFileStream;
  Request: TPadesRemoteSigningRequest;
  CmsDer: TBytes;
begin
  Request := TPdf.LoadPadesRemoteSigningRequest(RequestStream);
  TPdf.CompletePadesRemoteSignature(Prepared, Output, Request, CmsDer);
end;

See Also

PreparePadesRemoteSignature LoadPadesRemoteSigningRequest