PAdES B-B 與 B-T 簽章屬於所有版本;B-LT 與 B-LTA 層級需要 Enterprise 版(連結 FPdfEnterprise,搜尋路徑含 Lib\Enterprise),否則會在寫入任何輸出之前引發 EPdfEnterpriseRequired;請見 版本對照表
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 十六進位指紋字串 |
Active 必須為 True,且系統上必須有有效的密碼學程式庫messageImprint 符合要求、CMS 簽署者結構完整,且 DER 時間與整數編碼為標準形式時,才會接受 RFC 3161 回應/Annots 陣列與 AcroForm 的 /Fields 陣列參照CertificationPermission 接受 1、2 或 3,並拒絕第二個認證簽章LockAction 會建立對應的 /Lock 與 FieldMDP 約束
begin
if not Pdf1.Active then Exit;
Pdf1.SignPades('signed.pdf', 'a1b2c3d4e5f678901234567890abcdef12345678');
end;