PDFium Delphi Component Docs

SignPades 方法

PAdES B-B 與 B-T 簽章屬於所有版本;B-LT 與 B-LTA 層級需要 Enterprise 版(連結 FPdfEnterprise,搜尋路徑含 Lib\Enterprise),否則會在寫入任何輸出之前引發 EPdfEnterpriseRequired;請見 版本對照表

元件: TPdf  ·  單元: PDFium
使用本機憑證附加受限的核可或認證 PAdES 簽章

語法

function SignPades(const FileName: string; const Options: TPadesSignOptions): Boolean; overload;
function SignPades(const FileName: string; const Thumbprint: string): Boolean; overload;

說明

在 PDF 文件附加遞增式數位簽章更新,產生符合 PAdES B-B 或 B-T 的簽章字典

此方法同時支援進階憑證設定記錄,以及對應到 Windows 目前使用者 'MY' 存放區的簡單 SHA-1 十六進位指紋

Options.FieldOptions 可加入必要的 seed 值、允許的原因與法律聲明、可接受的簽署者憑證、欄位鎖定,以及核可或認證轉換參數

參數

FileName已簽署 PDF 將儲存的目標路徑
Options簽章詳細資料結構,包含憑證資料、時間戳記、承諾選項、安全性層級與欄位約束
Thumbprint本機 Windows 存放區中憑證的 SHA-1 十六進位指紋字串

備註

範例

begin
  if not Pdf1.Active then Exit;
  Pdf1.SignPades('signed.pdf', 'a1b2c3d4e5f678901234567890abcdef12345678');
end;

另請參閱

SignPadesToStream SignPadesWithPdfA ValidatePades