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

NameTypeAccessDescription
keysjava.util.Collection<String>ReadReturns all property keys.
bytesbyte[]ReadReturns the full XMP XML as UTF-8 bytes.
dirtybooleanReadReturns true if properties have been modified since parsing.
registryXmpNamespaceRegistryReadReturns the internal namespace registry.
propertiesMap<String, XmpProperty>ReadReturns the internal properties map (for serialization by Document).

Methods

SignatureDescription
XmpMetadata()Creates empty XMP metadata.
XmpMetadata(xmpBytes: byte[])Creates XMP metadata from raw XML bytes.
get(key: String)XmpValueReturns the value for the given key, or null if not present.
contains(key: String)booleanReturns 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)StringReturns the namespace URI for a prefix.
getPrefixByNamespaceUri(namespaceUri: String)StringReturns 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()booleanReturns true if properties have been modified since parsing.
getRegistry()XmpNamespaceRegistryReturns the internal namespace registry.
getProperties()Map<String, XmpProperty>Returns the internal properties map (for serialization by Document).

See Also