CheckFilePDFUACompliance

Compliance, Document inspection

Description

Audit a PDF file using an explicit PDF/UA reader profile

Syntax

Delphi

Function TPDFlib.CheckFilePDFUACompliance(Const InputFileName, Password: WideString;
  TargetPart, Options: Integer): Integer;

DLL

Function DLCheckFilePDFUACompliance(InstanceID: Integer; InputFileName, Password: PWideChar; TargetPart, Options: Integer): Integer; Stdcall;
Function DLCheckFilePDFUAComplianceA(InstanceID: Integer; InputFileName, Password: PAnsiChar; TargetPart, Options: Integer): Integer; Stdcall;

ActiveX

Function PDFlib::CheckFilePDFUACompliance(InputFileName As String, Password As String, TargetPart As Long, Options As Long) As Long

Remarks

TargetPart=0 selects part 2 only when XMP identifies pdfuaid:part=2; otherwise it selects part 1, 1 forces PDF/UA-1 and 2 forces PDF/UA-2

PDF/UA-2 checks cover identification part, revision and prefix, effective PDF 2.0 version, metadata title, marked status, display title, namespace references, role resolution, Document roots, parent links, and bounded tree traversal

A pass means no problems were found by the implemented checks; content tagging, reading order, fonts, annotations, language, alternative descriptions, MathML, and human accessibility review remain outside this core profile

Returns an issue-list handle or zero when implemented checks pass; file, password or invalid-target failures return zero with a nonzero LastErrorCode, so inspect that error before treating zero as success

Read issue items using 1-based GetStringListItem indexes and release every nonzero handle with ReleaseStringList; Options=1 stops at the first issue and other values collect all detected issues

See also

RunPDFUAValidationPipelineTask, GetPDFUAReadValidationCoverageJSON