PdfXmpMetadata

PdfXmpMetadata

Overview

PdfXmpMetadata is a class in Aspose.Pdf FOSS for Java. Inherits from: Closeable.

Thin facade over {@link Document#getMetadata()}, mirroring {@code Aspose.Pdf.Facades.PdfXmpMetadata}.

Properties

NameTypeAccessDescription
documentDocumentReadReturns the bound document, or {@code null}.
xmpMetadataXmpMetadataReadReturns the {@link XmpMetadata} of the bound document.

Methods

SignatureDescription
PdfXmpMetadata()Empty PdfXmpMetadata.
PdfXmpMetadata(inputFile: String)Bound to {@code inputFile}.
PdfXmpMetadata(document: Document)Bound to an already-loaded document.
getDocument()DocumentReturns the bound document, or {@code null}.
bindPdf(inputFile: String)booleanLoads a fresh {@link Document} from {@code inputFile}.
bindPdf(inputStream: InputStream)booleanLoads a fresh {@link Document} from {@code inputStream}.
bindPdf(document: Document)booleanBinds an already-loaded document.
getXmpMetadata()XmpMetadataReturns the {@link XmpMetadata} of the bound document.
contains(key: String)booleanReturns whether the XMP bag contains a property with the given key.
get(key: String)XmpValueReturns the property value for {@code key}, or {@code null} when absent.
add(key: String, value: String)Adds (or replaces) a string property under {@code key}.
add(key: String, value: XmpValue)Adds (or replaces) a typed property under {@code key}.
set(key: String, value: String)Sets a string property under {@code key} (replace semantics).
remove(key: String)Removes the property under {@code key}, if present.
save(outputFile: String)booleanSaves the bound document to {@code outputFile}.
close()

See Also