PLEmbeddedFilePDFAPart
Compliance, Document inspection
Requires the Enterprise edition — the unit belongs to the Enterprise edition and is not available in other editions
Description
Reports which ISO 19005 part an embedded PDF file claims in its XMP metadata. The bytes are checked for a %PDF- signature, opened in memory, and the pdfaid:part value is read; a claim of part 1 through 4 yields that number.
The function returns 0 when the bytes are not a PDF, when they open but carry no usable PDF/A claim, or when they are encrypted. It returns -1 when the bytes cannot be opened as a PDF at all yet still mention pdfaid:part or pdfaid:conformance in their raw content, which is how a damaged or truncated embedded PDF/A file announces itself.
The PDF/A-2 and PDF/A-3 audits use this probe when judging whether an embedded file is itself a conforming PDF/A document.
Syntax
Delphi
Function PLEmbeddedFilePDFAPart(Const Bytes: AnsiString): Integer;Parameters
| Bytes | The complete raw bytes of the embedded file |
|---|
Return values
| 1..4 | The embedded PDF identifies itself as PDF/A with that part number |
|---|---|
| 0 | The bytes are not a PDF/A file: no PDF signature, no usable claim, or an encrypted document |
| -1 | The file cannot be opened as a PDF but its raw bytes mention the PDF/A identification properties |
Remarks
This Pascal unit function has no separate DLL or ActiveX forwarding entry point.
See also
CheckFileCompliance, GetPDFAReadValidationCoverageJSON, SetPDFAMode, AutomatedValidationCoverage