SetXMPProperty
Document properties
Description
Sets a single XMP property within a standard namespace, using the library's built-in schema-aware XMP engine (PDFlibXMP) rather than requiring the caller to hand-write RDF XML. Loads the existing XMP packet, mutates the named property in the right rdf:Description block, and writes back.
Namespace is one of: dc (Dublin Core: title, creator, description, subject, format), xmp (XMP Basic: CreatorTool, CreateDate, ModifyDate), pdf (Adobe PDF: Keywords, Producer), pdfaid (PDF/A ID: part, conformance), pdfuaid (PDF/UA ID: part), xmpMM (XMP Media Management: InstanceID).
Syntax
Delphi
Function TPDFlib.SetXMPProperty(Const Namespace, Key, Value: WideString): Integer;
Parameters
| Namespace | One of 'dc','xmp','pdf','pdfaid','pdfuaid','xmpMM' |
|---|---|
| Key | The property name within that namespace (e.g. 'title','CreatorTool','Keywords') |
| Value | The new property value |
Return values
| 0 | Unknown namespace, empty key, or no document loaded |
|---|---|
| 1 | The property was set and the XMP packet written back |