PDFium Delphi Component Docs

PreparePadesRemoteSignature 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
Prepares a constrained PAdES detached-signature placeholder and a persistent request for remote completion

Syntax

function PreparePadesRemoteSignature(Prepared: TStream; const Options: TPadesRemoteSignOptions; out Request: TPadesRemoteSigningRequest): Boolean;

Description

Saves the active document, appends an invisible signature Widget and AcroForm field, reserves a fixed-width /Contents slot, finalises the incremental xref and trailer, and calculates the exact detached document digest with Options.DigestAlgorithm

Options.FieldOptions can author required seed values, allowed reasons and legal attestations, acceptable signer certificates, field locks, and approval or certification transform parameters

The returned request binds the digest and ByteRange to the complete prepared PDF fingerprint so the workflow can resume after a process, machine, or network boundary

Parameters

PreparedDestination stream for the immutable placeholder PDF sent alongside the remote signing request
OptionsSignature dictionary metadata, reserved CMS byte capacity, digest algorithm, and optional field constraints
RequestPersistent digest, digest choice, fingerprint, ByteRange, offset, and capacity metadata

Remarks

Example

var
  Prepared, RequestData: TMemoryStream;
  Options: TPadesRemoteSignOptions;
  Request: TPadesRemoteSigningRequest;
begin
  Options := TPadesRemoteSignOptions.Default;
  Prepared := TMemoryStream.Create;
  RequestData := TMemoryStream.Create;
  try
    if Pdf1.PreparePadesRemoteSignature(Prepared, Options, Request) then
      TPdf.SavePadesRemoteSigningRequest(RequestData, Request);
  finally
    RequestData.Free;
    Prepared.Free;
  end;
end;

See Also

CompletePadesRemoteSignature SignPadesToStream