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
| Name | Type | Access | Description |
|---|---|---|---|
document | Document | Read | Returns the bound document, or {@code null}. |
xmpMetadata | XmpMetadata | Read | Returns the {@link XmpMetadata} of the bound document. |
Methods
| Signature | Description |
|---|---|
PdfXmpMetadata() | Empty PdfXmpMetadata. |
PdfXmpMetadata(inputFile: String) | Bound to {@code inputFile}. |
PdfXmpMetadata(document: Document) | Bound to an already-loaded document. |
getDocument() → Document | Returns the bound document, or {@code null}. |
bindPdf(inputFile: String) → boolean | Loads a fresh {@link Document} from {@code inputFile}. |
bindPdf(inputStream: InputStream) → boolean | Loads a fresh {@link Document} from {@code inputStream}. |
bindPdf(document: Document) → boolean | Binds an already-loaded document. |
getXmpMetadata() → XmpMetadata | Returns the {@link XmpMetadata} of the bound document. |
contains(key: String) → boolean | Returns whether the XMP bag contains a property with the given key. |
get(key: String) → XmpValue | Returns 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) → boolean | Saves the bound document to {@code outputFile}. |
close() |