PDFium Delphi Component Docs

RenewPadesArchiveTimestamp 方法

Enterprise 版:需連結 FPdfEnterprise(搜尋路徑含 Lib\Enterprise);否則此方法會引發 EPdfEnterpriseRequired;請見 版本對照表

元件: TPdf  ·  單元: PDFium
將新的封存 Document Time-stamp 附加到既有的 PAdES 簽章鏈結

語法

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

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

說明

讀取作用中元件保留的原始檔案、記憶體緩衝區、自訂資料流或已完成的漸進式來源,並附加增量式的 RFC 3161 Document Time-stamp,其 ByteRange 涵蓋所有先前的修訂版本

RenewPadesArchiveTimestamp 會暫存完整的更新文件並寫入 FileName;RenewPadesArchiveTimestampToStream 則把相同結果交付給呼叫端持有的 Stream,完全不碰檔案系統

當 UpdateDss 為 True 時,會在時間戳記之前附加所提供的完整憑證、OCSP、CRL 與 VRI 資料,使回傳的權杖保護更新後的長期驗證狀態

只有在附加欄位可被探索且結構驗證回報 PAdES B-LTA 之後,才會寫入輸出

參數

FileName由完整暫存結果寫入的目的地路徑
Stream目的地資料流,只有在成功更新後才會清除並填入
OptionsTSA URL、nonce、權杖容量,以及可選的完整 DSS 替換資料
Report來源與結果等級、時間戳記計數、位元組長度、DSS 更新狀態、產生時間、政策 OID 與 nonce

備註

範例

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;

另請參閱

ValidatePades SaveAsPadesDss SignPades