PDFiumVCL Docs

ValidatePdfUa method

Component: TPdf  ·  Unit: PDFium
Inspects the currently open PDF for PDF/UA-1 compliance markers and returns a structured result with the detected conformance level plus the set of specific issues found.

Syntax

function ValidatePdfUa: TPdfUaValidationResult;

Description

ValidatePdfUa walks the open document looking for the PDF/UA-1 file-format markers defined by ISO 14289-1:2014:

The result is a TPdfUaValidationResult record:

ValidatePdfUa is a read-only inspection — it does not modify the document and is safe to call repeatedly. Use it before handing a PDF off to an archive system or accessibility checker to surface non-compliance to the operator. For the common "is this PDF/UA-1?" check that doesn't need the issue list, prefer the lighter-weight PdfUaConformance property.

Remarks

Example

uses System.TypInfo;

var
  Outcome: TPdfUaValidationResult;
  Issue: TPdfUaValidationIssue;
begin
  Pdf1.FileName := 'C:\Incoming\report.pdf';
  Pdf1.Active := True;
  Outcome := Pdf1.ValidatePdfUa;
  Memo1.Lines.Add('Level: ' + GetEnumName(TypeInfo(TPdfUaConformance),
    Ord(Outcome.Conformance)));
  for Issue in Outcome.Issues do
    Memo1.Lines.Add('- ' + GetEnumName(TypeInfo(TPdfUaValidationIssue), Ord(Issue)));
end;

See Also

PdfUaConformance, SaveAsPdfUa, SaveAsPdfUaToStream, IsTagged, ValidatePdfA