PDFium Component Docs

ValidatePdfE 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 ValidatePdfE: TPdfEValidationResult;

Description

ValidatePdfE walks the open document looking for the PDF/E-1 file-format markers defined by ISO 24517-1:2008:

The result is a TPdfEValidationResult record:

ValidatePdfE is a read-only inspection — it does not modify the document and is safe to call repeatedly. Use it before pushing a PDF/E payload into an engineering archive to surface the file-format-level non-conformances this library can detect. For the common "is this PDF/E-1?" check that doesn't need the issue list, prefer the lighter-weight PdfEConformance property.

Remarks

Example

uses System.TypInfo;

var
  Outcome: TPdfEValidationResult;
  Issue: TPdfEValidationIssue;
begin
  Pdf1.FileName := 'C:\Incoming\drawing.pdf';
  Pdf1.Active := True;
  Outcome := Pdf1.ValidatePdfE;
  Memo1.Lines.Add('Level: ' + GetEnumName(TypeInfo(TPdfEConformance),
    Ord(Outcome.Conformance)));
  for Issue in Outcome.Issues do
    Memo1.Lines.Add('- ' + GetEnumName(TypeInfo(TPdfEValidationIssue), Ord(Issue)));
end;

See Also

PdfEConformance, SaveAsPdfE, SaveAsPdfEToStream, ValidatePdfA, ValidatePdfUa