PDFium Component Docs

ValidatePdfX метод

Component: TPdf  ·  Unit: PDFium
Перевіряє відкритий PDF на наявність маркерів відповідності та повертає структурований результат із виявленим рівнем відповідності й набором знайдених конкретних проблем

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