CheckCompliancePDFUA
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
Reads an arbitrary PDF stream and audits it against ISO 14289, PDF/UA, appending one code-and-message string per finding to ResultList. The codes use the 1xxxx range so they stay visually separate from the 00xxx codes of CheckCompliancePDFA. The audit looks at the bytes of an existing file; GetPDFUADiagnostics performs the analogous writer-side checks on the document being built in memory.
This entry point auto-selects the target part from the document's XMP identification: pdfuaid:part=2 selects the PDF/UA-2 core reader-side checks, and anything else runs the PDF/UA-1 rule set. Call CheckCompliancePDFUAEx to force a specific part.
A score of 100 means the implemented checks found no issue; it is not full certification. GetPDFUAReadValidationCoverageJSON describes the checked and unverified areas.
Syntax
Delphi
Function CheckCompliancePDFUA(InputStream: TStream; Const Password: WideString;
Options: Integer; ResultList: TStringList): 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 |
Return values
| 100 | The implemented PDF/UA checks appended no issue to ResultList |
|---|---|
| 0 | At least one issue was appended, including 10059 when the reader could not parse or access the document |
Remarks
This Pascal unit function has no separate DLL or ActiveX forwarding entry point.
See also
CheckFilePDFUACompliance, GetPDFUAReadValidationCoverageJSON, GetPDFUADiagnostics, CheckFileCompliance, RunPDFUAValidationPipelineTask