XmpMetadata
Overview
XmpMetadata is a class in Aspose.Pdf FOSS for Java.
Inherits from: Iterable<Map.Entry<String, XmpValue>>.
Provides access to XMP metadata of a PDF document (ISO 32000-1 §14.3.2, ISO 16684-1).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
keys | java.util.Collection<String> | Read | Returns all property keys. |
bytes | byte[] | Read | Returns the full XMP XML as UTF-8 bytes. |
dirty | boolean | Read | Returns true if properties have been modified since parsing. |
registry | XmpNamespaceRegistry | Read | Returns the internal namespace registry. |
properties | Map<String, XmpProperty> | Read | Returns the internal properties map (for serialization by Document). |
Methods
| Signature | Description |
|---|---|
XmpMetadata() | Creates empty XMP metadata. |
XmpMetadata(xmpBytes: byte[]) | Creates XMP metadata from raw XML bytes. |
get(key: String) → XmpValue | Returns the value for the given key, or null if not present. |
contains(key: String) → boolean | Returns true if the given key is present. |
getKeys() → java.util.Collection<String> | Returns all property keys. |
set(key: String, value: XmpValue) | Sets a property value. |
set(key: String, value: String) | Sets a property value from a string. |
add(key: String, value: XmpValue) | Adds a property value. |
add(key: String, value: String) | Adds a property value from a string. |
remove(key: String) | Removes a property. |
registerNamespaceUri(prefix: String, namespaceUri: String) | Registers a custom namespace prefix-URI mapping. |
registerNamespaceUri(prefix: String, namespaceUri: String, schemaDescription: String) | Registers a custom namespace with description. |
getNamespaceUriByPrefix(prefix: String) → String | Returns the namespace URI for a prefix. |
getPrefixByNamespaceUri(namespaceUri: String) → String | Returns the prefix for a namespace URI. |
getBytes() → byte[] | Returns the full XMP XML as UTF-8 bytes. |
iterator() → Iterator<Map.Entry<String, XmpValue>> | Returns an iterator over all key-value pairs. |
isDirty() → boolean | Returns true if properties have been modified since parsing. |
getRegistry() → XmpNamespaceRegistry | Returns the internal namespace registry. |
getProperties() → Map<String, XmpProperty> | Returns the internal properties map (for serialization by Document). |