PDFiumVCL Docs

SaveAsPdfX method

Bu API girdisi tanımlayıcıları, imzaları, kod bloklarını ve PDF terimlerini özgün biçiminde korur.
Component: TPdf  ·  Unit: PDFium
Saves the current document as a PDF/X-1a:2001, PDF/X-3:2002, or PDF/X-4 conformant file by post-processing the base PDF with an incremental update that injects PDF/X file-format markers (ISO 15930 family).

Syntax

function SaveAsPdfX(const FileName: string): Boolean; overload;
function SaveAsPdfX(const FileName: string; const Options: TPdfXSaveOptions): Boolean; overload;

Description

SaveAsPdfX performs the regular SaveAs first, then layers an incremental update on top of the saved bytes that promotes the file to PDF/X conformance — the ISO 15930 family of print-exchange standards used in the graphic arts industry. The post-processing injects five classes of bytes into the saved stream:

The trailer is rewritten to add an /ID array. The output stays byte-identical to the base SaveAs result up to the end of the original PDF; only the incremental update is appended. The two overloads differ only in how the configuration is passed in: the file-name-only form uses TPdfXSaveOptions.Default (PDF/X-4 + sRGB + /Trapped /False) with auto-population of Info / DocumentId fields from FPDF_GetMetaText and FPDF_GetFileIdentifier.

Returns True on success. Returns False if the base SaveAs failed or if the incremental update could not be attached.

Remarks

Example

// Simple PDF/X-4 with bundled sRGB OutputIntent
if Pdf1.SaveAsPdfX('C:\AdProof.pdfx.pdf') then
  ShowMessage('Saved PDF/X-4');

// PDF/X-1a with a custom CMYK ICC profile (e.g. FOGRA39)
var
  Opts: TPdfXSaveOptions;
begin
  Opts := TPdfXSaveOptions.Default;
  Opts.Conformance := pxc1a;
  Opts.IccProfileData := TFile.ReadAllBytes('C:\ICC\FOGRA39.icc');
  Opts.OutputCondition := 'Coated FOGRA39 (ISO 12647-2:2004)';
  Opts.OutputConditionIdentifier:= 'FOGRA39';
  Opts.RegistryName := 'http://www.color.org';
  Opts.Trapped := ptFalse;
  Pdf1.SaveAsPdfX('C:\AdProof.cmyk.pdfx.pdf', Opts);
end;

See Also

SaveAsPdfXToStream, ValidatePdfX, PdfXConformance, SaveAsPdfA, SaveAsPdfE