PDFium Component Docs

SaveAsPdfUa メソッド

この API エントリでは識別子、シグネチャ、コードブロック、PDF 用語を元の表記のまま保持します。
コンポーネント: TPdf  ·  ユニット: PDFium
基本 PDF に増分更新の後処理を行い、PDF/UA ファイル形式マーカーを注入して、現在の文書を PDF/UA-1 準拠ファイルとして保存します

構文

function SaveAsPdfUa(const FileName: string): Boolean; overload;
function SaveAsPdfUa(const FileName: string; const Options: TPdfUaSaveOptions): Boolean; overload;

説明

SaveAsPdfUa performs the regular SaveAs first, then layers an incremental update on top of the saved bytes that promotes the file to a PDF/UA-1 archive (ISO 14289-1:2014). The post-processing injects four classes of markers into the saved stream:

The output stays byte-identical to the base SaveAs result up to the end of the original PDF; only the incremental update is appended Existing readers that don't understand PDF/UA still render the file exactly as the regular SaveAs would. The two overloads differ only in how the configuration is passed in: the file-name-only form uses TPdfUaSaveOptions.Default with auto-population from FPDF_GetMetaText / FPDF_GetFileIdentifier / FPDFCatalog_GetLanguage, while the TPdfUaSaveOptions form lets the caller override Title, Author, Subject, Keywords, Creator, Producer, CreationDate, ModDate, Language, DocumentId, InstanceId, and the pdfuaid Part / Amd / Corr identifiers.

Returns True on success. Returns False if the base SaveAs failed or if the incremental update could not be attached (PDF too short, invalid trailer, encrypted source).

備考

// Simple PDF/UA-1 output, options auto-populated from the document
if Pdf1.SaveAsPdfUa('C:\Report.pdfua.pdf') then
  ShowMessage('Saved PDF/UA-1');

// With explicit options (Title overridden, language explicit)
var
  Opts: TPdfUaSaveOptions;
begin
  Opts := TPdfUaSaveOptions.Default;
  Opts.DocumentTitle := 'Quarterly Report Q3 2026';
  Opts.Language := 'en-US';
  Pdf1.SaveAsPdfUa('C:\Report.q3.pdfua.pdf', Opts);
end;

関連項目

SaveAsPdfUaToStream, ValidatePdfUa, PdfUaConformance, SaveAsPdfA, IsTagged