function SaveAsPdfVT(const FileName: string): Boolean; overload;
function SaveAsPdfVT(const FileName: string; const Options: TPdfVTSaveOptions): Boolean; overload;
SaveAsPdfVT performs the regular SaveAs first, then layers an incremental update on top of the saved bytes that promotes the file to single-file PDF/VT-1 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:
pdfxid:GTS_PDFXVersion = "PDF/X-4") and PDF/VT identification (pdfvtid:GTS_PDFVTVersion = "PDF/VT-1" with pdfvtid:GTS_PDFVTModDate matching xmp:ModifyDate per §6.3 NOTE 1), plus a pdfaExtension:schemas description for both pdfxid and pdfvtid namespaces./GTS_PDFXVersion (PDF/X-4) and /Trapped. Existing Info entries are preserved./Metadata and /OutputIntents references./Type /OutputIntent /S /GTS_PDFX and an embedded ICC profile (sRGB by default; supply CMYK via Options.IccProfileData for production print)./DPartRoot and document-level /DPart hierarchy when the source document does not already contain a usable one, with each page linked through its /DPart entry./ID array.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.
/DPartRoot dictionary in the catalog with a tree of /DPart nodes. When the source document lacks a usable hierarchy, or the hierarchy fails the same tree/order checks as ValidatePdfVT, SaveAsPdfVT creates one document-level DPart that covers the current page tree order. Workflows that need recipient, product, or mail-piece metadata should author a richer DPart/DPM tree before saving or extend the generated one afterwards.TPdfVTSaveOptions.Conformance = pvc2 is accepted for compatibility but the single-file writer normalizes output to PDF/VT-1. PDF/VT-2 is a file-set profile whose valid PDF/X bases are PDF/X-4p, PDF/X-5g, or PDF/X-5pg, so it cannot be produced by this single-output-file method.Options.IccProfileData along with matching OutputCondition / OutputConditionIdentifier / RegistryName.
// 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;