PDFium Delphi Component Docs

ValidatePdfX method

Enterprise edition: link FPdfEnterprise with Lib\Enterprise on the search path; otherwise this method raises EPdfEnterpriseRequired; see the edition matrix

Component: TPdf  ·  Unit: PDFium
Inspects the currently open PDF for PDF/X markers and selected content-level requirements, returning the detected conformance level plus the set of specific issues found

Syntax

function ValidatePdfX: TPdfXValidationResult;

Description

ValidatePdfX walks the open document looking for file-format markers and selected content rules defined by the ISO 15930 family

pvxiInvalidOutputProfile reports a PDF/X-1a output profile that is unsupported, malformed or incompatible with those requirements, including an RGB profile disguised by /N 4 or an incorrect component count. Both the sparse and compatibility validators perform this check; a /DestOutputProfile reference alone no longer establishes an acceptable PDF/X-1a profile

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