وثائق PDFiumVCL

ValidatePdfA method

يحافظ إدخال API هذا على المعرّفات والتواقيع وكتل الكود ومصطلحات PDF بصيغتها الأصلية.
Component: TPdf  ·  Unit: PDFium
Inspects the currently open PDF for PDF/A compliance markers and returns a structured result with the detected conformance level plus the set of specific issues found.

Syntax

function ValidatePdfA: TPdfAValidationResult;

Description

ValidatePdfA walks the open document looking for every PDF/A conformance marker defined by ISO 19005-1 (with Cor.1:2007):

The result is a TPdfAValidationResult record:

ValidatePdfA 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 to surface non-compliance to the operator. For the common "what level is this?" check that doesn't need the issue list, prefer the lighter-weight PdfAConformance property.

Remarks

Example

uses System.TypInfo;

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

See Also

PdfAConformance, SaveAsPdfA, SaveAsPdfAToStream