PAdES B-B 與 B-T 簽章屬於所有版本;B-LT 與 B-LTA 層級需要 Enterprise 版(連結 FPdfEnterprise,搜尋路徑含 Lib\Enterprise),否則會在寫入任何輸出之前引發 EPdfEnterpriseRequired;請見 版本對照表
function SignPadesWithPdfA(const FileName: string; const Options: TPadesSignOptions; PdfAOptions: TPdfASaveOptions): Boolean;
執行 PDF/A 一致性轉換與 PAdES 數位簽署的組合,在單一工作流程中輸出長期封存相容的文件
| FileName | 已簽署之 PDF/A 檔案的目的路徑 |
| Options | PAdES 簽章設定記錄 |
| PdfAOptions | PDF/A 目標一致性層級與選項記錄 |
Active 為 True
var
SignOpts: TPadesSignOptions;
PdfAOpts: TPdfASaveOptions;
begin
if not Pdf1.Active then Exit;
SignOpts := TPadesSignOptions.Default;
SignOpts.CertificateThumbprint := 'a1b2c3d4';
PdfAOpts.Conformance := pacPdfA1b;
Pdf1.SignPadesWithPdfA('archived-signed.pdf', SignOpts, PdfAOpts);
end;