CheckCompliancePDFUAEx
Compliance, Document inspection
Requires the Enterprise edition — the unit belongs to the Enterprise edition; the library-level wrapper CheckFilePDFUACompliance keeps the entry point in every edition, where non-Enterprise builds return 0 and set LastErrorCode to 900 (PDFLIB_ERROR_ENTERPRISE_REQUIRED)
Description
The part-selecting form of the PDF/UA read audit. TargetPart 0 reads the target part from the document's XMP identification (pdfuaid:part=2 selects part 2, otherwise part 1), while 1 and 2 enforce that part regardless of what the metadata claims. Any other value appends issue 10060 and returns 0.
Part 1 runs the full ISO 14289-1:2014 rule walk and reports in the 1xxxx code range. Part 2 deliberately avoids applying part-1-only rules: it runs the PDF/UA-2 core identification, namespace, role and structure checks, then adds the shared interactive-form evidence, and structured reports disclose fullCertification=false through the coverage JSON.
A score of 100 means the implemented checks found no issue; it is not full certification. Options follows the shared audit contract: 0 keeps walking so the caller sees every violation, 1 hard-stops after the first failure.
Syntax
Delphi
Function CheckCompliancePDFUAEx(InputStream: TStream; Const Password: WideString;
Options: Integer; ResultList: TStringList; TargetPart: Integer): Integer;Parameters
| InputStream | The PDF bytes to audit; the stream is read, not written or closed |
|---|---|
| Password | Password used to open an encrypted document; an empty string suits unencrypted files |
| Options | 0 reports every issue found; 1 stops the audit at the first failed rule |
| ResultList | Receives one string per finding; pass nil to let the function collect findings into an internal list |
| TargetPart | 0 selects the XMP-identified part, 1 enforces PDF/UA-1, 2 enforces the PDF/UA-2 core checks |
Return values
| 100 | The implemented checks for the selected part appended no issue to ResultList |
|---|---|
| 0 | At least one issue was appended: 10059 for an unreadable or inaccessible document, 10060 for an unsupported target part, or a rule violation |
Remarks
This Pascal unit function has no separate DLL or ActiveX forwarding entry point.
See also
CheckFilePDFUACompliance, GetPDFUAReadValidationCoverageJSON, GetWCAGMappingJSON, AutomatedValidationCoverage, CheckFileCompliance