function ValidatePdfVT: TPdfVTValidationResult;
ValidatePdfVT walks the open document looking for the file-format-level markers defined by ISO 16612-2:2010:
pdfvtid:GTS_PDFVTVersion (§6.3 Table 2) and pdfvtid:GTS_PDFVTModDate.pdfvtid:GTS_PDFVTModDate and xmp:ModifyDate (§6.3 NOTE 1).pdfxid:GTS_PDFXVersion — PDF/VT-1 must also be PDF/X-4 (§6.2.1).pdfaExtension:schemas description for both pdfvtid and pdfxid namespaces./DPartRoot entry (§6.5 Document Part Hierarchy)./OutputIntents array with an OutputIntent that has /DestOutputProfile (inherited PDF/X-4 requirement)./ID array and the absence of /Encrypt (PDF/X forbids encryption).xmp:CreateDate and xmp:ModifyDate entries in XMP for Info / XMP parity.The result is a TPdfVTValidationResult record:
pvc1 (PDF/VT-1 marker), pvc2 (PDF/VT-2 marker), pvcNone (no PDF/VT marker), or pvcUnknown (marker present but version unrecognized).TPdfVTValidationIssues set with zero or more values: pvviMissingXmpMetadata, pvviMissingPdfVTIdentifier, pvviMissingExtensionSchema, pvviMissingPdfVTModDate, pvviModDateMismatch, pvviMissingDPartRoot, pvviMissingPdfXIdentifier, pvviMissingOutputIntent, pvviMissingIccProfile, pvviMissingTrailerId, pvviEncryptionPresent, pvviMissingXmpDates.ValidatePdfVT is read-only. Pair it with a PDF/X preflight tool for full content-level PDF/X-4 verification and a dedicated PDF/VT validator (callas pdfaPilot, etc.) that can walk the DPart tree.
pvviMissingDPartRoot is emitted when the catalog lacks a /DPartRoot entry. ISO 16612-2 §6.5 makes the DPart hierarchy a structural feature of PDF/VT files — without it, the file carries the PDF/VT marker but cannot be processed by PDF/VT-aware printers that route pages per recipient.pvviModDateMismatch is emitted only when both pdfvtid:GTS_PDFVTModDate and xmp:ModifyDate are present and their values differ. SaveAsPdfVT always writes them with the same value.Conformance = pvcUnknown and an empty Issues set.
uses System.TypInfo;
var
Outcome: TPdfVTValidationResult;
Issue: TPdfVTValidationIssue;
begin
Pdf1.FileName := 'C:\Incoming\statements.pdf';
Pdf1.Active := True;
Outcome := Pdf1.ValidatePdfVT;
Memo1.Lines.Add('Level: ' + GetEnumName(TypeInfo(TPdfVTConformance),
Ord(Outcome.Conformance)));
for Issue in Outcome.Issues do
Memo1.Lines.Add('- ' + GetEnumName(TypeInfo(TPdfVTValidationIssue), Ord(Issue)));
end;