Docs PDFiumVCL

SaveAsPdfVT method

Cette entrée API conserve identifiants, signatures, blocs de code et termes PDF dans leur forme d’origine.
Component: TPdf  ·  Unit: PDFium
Saves the current document as a PDF/VT-1 or PDF/VT-2 conformant file (ISO 16612-2:2010, the variable and transactional printing PDF subset).

Syntax

function SaveAsPdfVT(const FileName: string): Boolean; overload;
function SaveAsPdfVT(const FileName: string; const Options: TPdfVTSaveOptions): Boolean; overload;

Description

SaveAsPdfVT performs the regular SaveAs first, then layers an incremental update on top of the saved bytes that promotes the file to PDF/VT-1 or PDF/VT-2 conformance. PDF/VT is the ISO 16612-2 subset of PDF designed for variable-data and transactional printing — personalised mail, statements, marketing collateral — where each recipient's pages are grouped through a Document Part Hierarchy.

PDF/VT-1 is built on top of PDF/X-4 (ISO 16612-2 §6.2.1 requires every PDF/VT-1 file to also conform to PDF/X-4), so the injector writes the full PDF/X-4 marker set alongside the PDF/VT specific properties:

The default options target PDF/VT-1 with the bundled sRGB OutputIntent and /Trapped /False. The two overloads differ only in how the configuration is passed in: the file-name- only form auto-populates Info fields and DocumentId from FPDF_GetMetaText / FPDF_GetFileIdentifier.

Returns True on success.

Remarks

Example

// Simple PDF/VT-1 with bundled sRGB OutputIntent
if Pdf1.SaveAsPdfVT('C:\Statements.pdfvt.pdf') then
  ShowMessage('Saved PDF/VT-1');

// PDF/VT-1 with a CMYK ICC profile for commercial print
var
  Opts: TPdfVTSaveOptions;
begin
  Opts := TPdfVTSaveOptions.Default;
  Opts.IccProfileData := TFile.ReadAllBytes('C:\ICC\FOGRA39.icc');
  Opts.OutputCondition := 'Coated FOGRA39 (ISO 12647-2:2004)';
  Opts.OutputConditionIdentifier:= 'FOGRA39';
  Pdf1.SaveAsPdfVT('C:\BillingRun.pdfvt.pdf', Opts);
end;

See Also

SaveAsPdfVTToStream, ValidatePdfVT, PdfVTConformance, SaveAsPdfX