PDFium Component Docs

Phương thức ValidatePdfVT

Component: TPdf  ·  Unit: PDFium
Kiểm tra PDF đang mở để tìm các dấu hiệu tuân thủ và trả về kết quả có cấu trúc với mức tuân thủ đã phát hiện cùng tập các vấn đề cụ thể được tìm thấy

Syntax

function ValidatePdfVT: TPdfVTValidationResult;

Description

ValidatePdfVT walks the open document looking for the file-format-level markers defined by ISO 16612-2:2010:

The result is a TPdfVTValidationResult record:

ValidatePdfVT is read-only. It checks the file-format markers, selected DPart tree semantics, exact PDF/VT-to-PDF/X base pairing, and XMP properties whether they are written as elements or RDF attributes. Pair it with a PDF/X preflight engine for full content-level verification and, for PDF/VT-2, a complete file-set validator. PDF/VT-2s is a MIME stream conformance level whose version is signalled by the MIME stream header in ISO 16612-2 Annex A, not by a file-level pdfvtid:GTS_PDFVTVersion value.

Remarks

Example

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;

See Also

PdfVTConformance, SaveAsPdfVT, SaveAsPdfVTToStream, ValidatePdfX