XMPBox implements Adobe’s XMP (Extensible Metadata Platform) specification for Java. It can parse, validate, and serialize XMP metadata embedded in PDF documents and is used by PDFBox when reading or writing document-level metadata. XMPBox is required when your application must produce or inspect PDF/A compliance metadata or any other XMP schema beyond what the basic PDFBox document information dictionary provides.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apache/pdfbox/llms.txt
Use this file to discover all available pages before exploring further.
Dependency
Key classes
| Class | Package | Purpose |
|---|---|---|
XMPMetadata | org.apache.xmpbox | Root container for all XMP schemas in a document; created via XMPMetadata.createXMPMetadata() |
DublinCoreSchema | schema | Dublin Core properties: title, creator, description, subject, date |
AdobePDFSchema | schema | Adobe PDF-specific properties: PDFVersion, Producer, Keywords |
PDFAIdentificationSchema | schema | PDF/A conformance level and part identifier required for PDF/A compliance |
XMPBasicSchema | schema | Core XMP properties: CreateDate, ModifyDate, CreatorTool |
XmpSerializer | xml | Serializes an XMPMetadata object to an XML byte stream |
DomXmpParser | xml | Parses raw XMP XML bytes into an XMPMetadata object |
Reading XMP from a PDF
UsePDMetadata to retrieve the raw XMP stream from a PDDocument, then parse it with DomXmpParser.
Writing XMP metadata
Create anXMPMetadata instance, populate the required schemas, then serialize and attach the result to the document catalog.
XMPBox is required if you need PDF/A compliance metadata. The
PDFAIdentificationSchema must be present and correctly populated for a document to be validated as PDF/A-1b, PDF/A-2b, or similar conformance levels.