---
Product: Aspose.PDF
Platform: java
Page Type: docs
Canonical URL: https://docs.aspose.org/pdf/java/developer-guide/xmp
---

# XMP Metadata

Read and write XMP metadata in PDF documents using Aspose.PDF FOSS for Java.

## Overview

XMP (Extensible Metadata Platform) is an XML-based metadata format embedded in
PDF documents to describe title, author, creation date, modification date, and
custom properties (ISO 32000-1:2008, §14.3).

## XmpMetadata

`XmpMetadata` provides access to the XMP metadata stream embedded in a PDF document.
It is accessible via the document's metadata dictionary:

```java
try (Document doc = new Document("input.pdf")) {
    XmpMetadata xmp = doc.getMetadata();
    // Access standard XMP properties
}
```

## Reading Metadata

Standard XMP properties such as creator, creation date, and modification date are
accessible through the `XmpMetadata` API as typed property values.

## DocumentInfo

The `DocumentInfo` class provides access to the classic PDF document information
dictionary (Title, Author, Subject, Keywords, Creator, Producer, CreationDate,
ModDate). Both `DocumentInfo` and `XmpMetadata` exist independently and may contain
different values.

Use `Document.getInfo()` to obtain the `DocumentInfo` instance:

```java
try (Document doc = new Document("input.pdf")) {
    DocumentInfo info = doc.getInfo();
    String title = info.getTitle();
    String author = info.getAuthor();
}
```

## See Also

- [Aspose.PDF for Java — Enterprise Documentation](https://docs.aspose.com/pdf/java/)