PDFium Delphi Component Docs

RenewPadesArchiveTimestamp method

Component: TPdf  ·  Unit: PDFium
Appends a new archival Document Time-stamp to an existing PAdES signature chain

Syntax

function RenewPadesArchiveTimestamp(const FileName: string; const Options: TPadesArchiveTimestampOptions; out Report: TPadesArchiveTimestampReport): Boolean;

function RenewPadesArchiveTimestampToStream(Stream: TStream; const Options: TPadesArchiveTimestampOptions; out Report: TPadesArchiveTimestampReport): Boolean;

Description

Reads the exact original file, memory buffer, custom stream or completed progressive source retained by the active component and appends an incremental RFC 3161 Document Time-stamp whose ByteRange covers every prior revision

When UpdateDss is True, the supplied complete certificate, OCSP, CRL and VRI material is appended before the timestamp so the returned token protects the refreshed long-term validation state

The output is written only after the appended field is discoverable and structural validation reports PAdES B-LTA

Parameters

FileNameDestination path written from a fully staged result
StreamDestination stream cleared and filled only after successful renewal
OptionsTSA URL, nonce, token capacity and optional complete DSS replacement material
ReportSource and result levels, timestamp counts, byte lengths, DSS update state, generation time, policy OID and nonce

Remarks

Example

var
  Options: TPadesArchiveTimestampOptions;
  Report: TPadesArchiveTimestampReport;
begin
  Options := TPadesArchiveTimestampOptions.Default;
  Options.TsaUrl := 'https://tsa.example.test';
  Options.Nonce := 42;
  if Pdf1.RenewPadesArchiveTimestamp('renewed.pdf', Options, Report) then
    ShowMessage(Format('%d archival timestamps', [Report.ResultDocTimeStampCount]));
end;

See Also

ValidatePades SaveAsPadesDss SignPades