Enterprise 版:需連結 FPdfEnterprise(搜尋路徑含 Lib\Enterprise);否則此方法會引發 EPdfEnterpriseRequired;請見 版本對照表
function SaveAsPdfE(const FileName: string): Boolean; overload;
function SaveAsPdfE(const FileName: string; const Options: TPdfESaveOptions): Boolean; overload;
SaveAsPdfE 會先執行一般 SaveAs,再於儲存後的位元組上層 附加一個增量更新,把檔案升級為 PDF/E-1 封存檔 (ISO 24517-1:2008,衍生自 PDF 1.6 的工程文件 格式)。後處理會把四類標記注入儲存後的串流:
pdfe:ISO_PDFEVersion = "PDF/E-1")加上 pdfe 命名空間對應的 pdfaExtension:schemas 描述,以及經 §13.1 繼承自 ISO 19005-1 §6.7 的橋接 Dublin Core / xmp / pdf 屬性(dc:title / dc:creator / dc:description / xmp:CreateDate / xmp:ModifyDate / xmp:MetadataDate / xmp:CreatorTool / pdf:Producer / pdf:Keywords)。§13.5 也要求檔案識別碼,所以封包一律帶有 xmpMM:DocumentID 與 xmpMM:VersionID——以 DocumentId / InstanceId 選項組成的 uuid: 字串(呼叫端留空時由它們衍生),外加 xmpMM:RenditionClass = "default";沒有提供標題時 dc:title 會寫成 Untitled,因為 §13.5 禁止該值為零長度/ISO_PDFEVersion (PDF/E-1) 項目。Info 物件保留原本的物件編號;PDFium 產生的 Info 項目原封不動保留。當來源 trailer 沒有 /Info 時,會合成全新的 Info 字典,並把新的 /Info 參照寫入 trailer/Metadata 參照,以及 /OutputIntents 陣列(§6.2),參照新的 OutputIntent 字典 — /S /GTS_PDFE1,/OutputConditionIdentifier 與 /Info 皆為 sRGB IEC61966-2.1,/DestOutputProfile 則指向新內嵌的 sRGB ICC 描述檔串流,其 /N 從描述檔標頭讀取而非寫死。目錄中既有的 /Metadata 與 /OutputIntents 項目會先移除,所以驗證器解析到的就是注入的這些值/ID 陣列(§6.2):來源 PDF 已帶有識別碼時從 FPDF_GetFileIdentifier 重用,否則從來源位元組確定性地衍生輸出在原始 PDF 結尾之前與基礎 SaveAs 的結果逐位元組相同;
只有增量更新會被附加。不了解 PDF/E 的舊式閱讀器
仍會像一般 SaveAs 那樣算繪該檔案。兩個多載的差異僅在於
設定的傳入方式:僅傳檔名的形式使用
TPdfESaveOptions.Default 並從
FPDF_GetMetaText 與 FPDF_GetFileIdentifier
自動填入,而 TPdfESaveOptions 形式讓呼叫端覆寫
Title、Author、Subject、Keywords、Creator、Producer、CreationDate、
ModDate、DocumentId、InstanceId 以及 Version 字串
(預設為 "PDF/E-1")
成功時傳回 True。若基礎 SaveAs 失敗,或增量更新
無法附加(通常是儲存位元組中的 trailer 無效),則傳回 False
http://www.aiim.org/pdfe/ns/id/(AIIM 產業慣例,與 pdfa / pdfua 的 URI 一致)。ISO 24517-1:2008 §13.3 的條文印刷時少了一個 "i" 字母,似乎是手誤。若驗證器要求嚴格規格拼寫,可透過 TPdfESaveOptions.Version 覆寫
// Simple PDF/E-1 output, options auto-populated from the document
if Pdf1.SaveAsPdfE('C:\Drawing.pdfe.pdf') then
ShowMessage('Saved PDF/E-1');
// With explicit options (Title overridden, custom Producer)
var
Opts: TPdfESaveOptions;
begin
Opts := TPdfESaveOptions.Default;
Opts.Title := 'Bridge Assembly Drawing - Sheet 12';
Opts.Producer := 'PDFium Delphi Component';
Pdf1.SaveAsPdfE('C:\Bridge.pdfe.pdf', Opts);
end;