THotPDF.SetLoadedXMPMetadata Method
Writes the complete XMP metadata XML string to the loaded PDF document's metadata stream, replacing the existing XMP packet
Declaration
procedure SetLoadedXMPMetadata(const AXML: AnsiString);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
AXML | Complete XML string conforming to the XMP specification, normally starting with an <?xpacket header |
Return value
This member returns no value
Usage notes
- The XML string you pass in must be a well-formed XMP packet, otherwise some PDF viewers may raise errors while validating the metadata
- This method replaces the entire XMP stream; if only partial fields need modifying, the existing XMP content should first be read, edited in memory, and then passed back
- XMP metadata and the information dictionary complement each other and may be inconsistent; it is recommended to use methods such as SetLoadedAuthor simultaneously to keep them synchronised