XmpMetadataHandler
Overview
XmpMetadataHandler is a class in Aspose.Pdf FOSS for Java.
Reads and writes XMP metadata packets for PDF/A compliance.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
allProperties | Map<String, String> | Read | Returns an unmodifiable map of all parsed properties. |
pdfAPart | int | Read | Returns the PDF/A part number from the XMP metadata, or 0 if not present. |
pdfAConformance | String | Read | Returns the PDF/A conformance level from the XMP metadata, or {@code null} if not present. |
Methods
| Signature | Description |
|---|---|
readFromCatalog(catalog: COSDictionary) → XmpMetadataHandler | Reads XMP metadata from a PDF catalog dictionary. |
createXmpBytes(properties: Map<String, String>, pdfaPart: int, pdfaConformance: String) → byte[] | Creates an XMP metadata byte array suitable for embedding in a PDF stream. |
getProperty(namespace: String, name: String) → String | Returns a property value by namespace URI and local name. |
getAllProperties() → Map<String, String> | Returns an unmodifiable map of all parsed properties. |
hasPdfAId() → boolean | Returns {@code true} if the XMP metadata contains a {@code pdfaid:part} property. |
getPdfAPart() → int | Returns the PDF/A part number from the XMP metadata, or 0 if not present. |
getPdfAConformance() → String | Returns the PDF/A conformance level from the XMP metadata, or {@code null} if not present. |
pdfDateToXmpDate(pdfDate: String) → String | Converts a PDF date string to XMP date format. |
buildXmpPacket(dcTitle: String, dcCreator: String, dcDescription: String, pdfKeywords: String, xmpCreatorTool: String, pdfProducer: String, xmpCreateDate: String, xmpModifyDate: String, pdfaPart: int, pdfaConformance: String) → byte[] | Builds a complete XMP packet with all standard namespaces for PDF/A compliance. |