PDFium Component Docs

ValidatePdfX method

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 ValidatePdfX: TPdfXValidationResult;

Description

ValidatePdfX walks the open document looking for the file-format markers defined by the ISO 15930 family:

The result is a TPdfXValidationResult record:

ValidatePdfX is a read-only inspection. Use it before pushing a PDF/X payload into a prepress workflow to surface non-conformance to the operator. For the common "what PDF/X level is this?" check that doesn't need the issue list, prefer the lighter-weight PdfXConformance property.

Remarks

Example

uses System.TypInfo;

var
  Outcome: TPdfXValidationResult;
  Issue: TPdfXValidationIssue;
begin
  Pdf1.FileName := 'C:\Incoming\ad.pdf';
  Pdf1.Active := True;
  Outcome := Pdf1.ValidatePdfX;
  Memo1.Lines.Add('Level: ' + GetEnumName(TypeInfo(TPdfXConformance),
    Ord(Outcome.Conformance)));
  for Issue in Outcome.Issues do
    Memo1.Lines.Add('- ' + GetEnumName(TypeInfo(TPdfXValidationIssue), Ord(Issue)));
end;

See Also

PdfXConformance, SaveAsPdfX, SaveAsPdfXToStream, ValidatePdfA, ValidatePdfE, ValidatePdfUa