SetPDFDeclarations
Compliance
Description
Writes machine-readable PDF Declarations conformance claims into the document catalog
Syntax
Delphi
Function SetPDFDeclarations(Const URIs, Roles, Versions: WideString): Integer;Parameters
| URIs | Semicolon-separated declaration URIs; required, and an empty value writes nothing |
|---|---|
| Roles | Semicolon-separated roles matched positionally to URIs; entries beyond the supplied list default to S |
| Versions | Semicolon-separated version strings matched positionally to URIs; missing entries default to an empty version |
Return values
| 0 | No document is loaded or the URI list is empty |
|---|---|
| N | Number of declaration entries written |
Remarks
All three parameters are semicolon-separated lists. Roles default to S (claiming) when the role list is shorter; versions default to empty. Declarations are stored under /PieceInfo /PDF_Declarations so automated processors can discover conformance claims without parsing XMP. Call ClearPDFDeclarations to remove them again.
Example
PDF.SetPDFDeclarations("https://pdfa.org/declarations#ua2", "S", "2024");