PDFium Delphi Component Docs

SignPadesWithPdfA 方法

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

元件: TPdf  ·  單元: PDFium
儲存符合 PDF/A 封存標準且已簽署的 PAdES PDF 文件

語法

function SignPadesWithPdfA(const FileName: string; const Options: TPadesSignOptions; PdfAOptions: TPdfASaveOptions): Boolean;

說明

執行 PDF/A 一致性轉換與 PAdES 數位簽署的組合,在單一工作流程中輸出長期封存相容的文件

參數

FileName已簽署之 PDF/A 檔案的目的路徑
OptionsPAdES 簽章設定記錄
PdfAOptionsPDF/A 目標一致性層級與選項記錄

備註

範例

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;

另請參閱

SignPades SaveAsPadesDss