PDFium Delphi Component Docs

SaveAsPadesDssToStream method

Component: TPdf  ·  Unit: PDFium
Saves the active PDF to a custom stream while embedding PAdES DSS validation certificates

Syntax

function SaveAsPadesDssToStream(Stream: TStream; const Options: TPadesDssOptions): Boolean;

Description

Saves the current document bytes into a custom stream while injecting X.509 validation materials (certificates, CRLs, and OCSP responses) into the document's global /DSS dictionary

TPadesDssOptions.Vris writes signature-specific indirect VRI dictionaries whose certificate, OCSP, and CRL arrays reference deduplicated global material streams

Parameters

StreamDestination stream to write the output bytes into
OptionsComplete DSS configuration containing validation material and signature-specific VRI entries

Remarks

Example

var
  MemStream: TMemoryStream;
  DssOpts: TPadesDssOptions;
begin
  if not Pdf1.Active then Exit;
  MemStream := TMemoryStream.Create;
  try
    DssOpts := TPadesDssOptions.Default;
    Pdf1.SaveAsPadesDssToStream(MemStream, DssOpts);
  finally
    MemStream.Free;
  end;
end;

See Also

SaveAsPadesDss SignPadesToStream