Instructions for AI agents working with Java examples in this repository.
GroupDocs.Metadata for Java lets applications read, search, edit, and remove metadata — including EXIF, XMP, IPTC, Office properties, PDF info, and ID3 — from 110+ document, image, audio, video, archive, font, CAD, GIS, and ebook formats, without Microsoft Office or Adobe dependencies.
Supported formats: 110+ file formats — authoritative table: https://docs.groupdocs.com/metadata/java/supported-document-formats/
Human overview: see README.md in this repository.
Add the dependency via Maven (coordinates from the Java release hub):
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-metadata</artifactId>
<version>26.1</version>
</dependency>Use the Artifact Repository repository URL in pom.xml / settings.xml as documented on the release hub.
Package / release hub: https://releases.groupdocs.com/metadata/java/
| Resource | URL |
|---|---|
| Documentation | https://docs.groupdocs.com/metadata/java/ |
| API reference | https://reference.groupdocs.com/metadata/java/ |
| Code examples (this repo) | https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-Java |
| Release notes | https://releases.groupdocs.com/metadata/java/ |
| Package (Maven) | https://releases.groupdocs.com/java/repo/com/groupdocs/groupdocs-metadata/ |
| Free support forum | https://forum.groupdocs.com/c/metadata/ |
| Temporary license | https://purchase.groupdocs.com/temp-license |
For IDE agents that support MCP, see https://github.com/groupdocs-metadata/GroupDocs.Metadata.Mcp. This examples repository demonstrates the on-premise SDK path.
Apply a GroupDocs license before processing files without evaluation limitations:
import com.groupdocs.metadata.License;
// Call once at application startup
new License().setLicense("path/to/GroupDocs.Metadata.lic");Use a temporary license for local development. Do not commit license files to this repository.
| Surface | Type | Notes |
|---|---|---|
| This SDK | com.groupdocs.metadata.Metadata |
Primary entry |
| Cloud Java SDK | Cloud client types | Not used in this repo — requires Cloud credentials |
| MCP | MCP tools ReadMetadata, RemoveMetadata |
Separate repo — https://github.com/groupdocs-metadata/GroupDocs.Metadata.Mcp |
Typical SDK pattern:
try (Metadata metadata = new Metadata("input.pdf")) {
// read / edit / sanitize / save
metadata.save("output.pdf");
}API reference: https://reference.groupdocs.com/metadata/java/
Sample folders under Examples/:
Examples/Resources/Examples/src/
Topics from README.md:
- Read, Write, Update & Remove Document Metadata
- Get Started with GroupDocs.Metadata for Java
- Find Metadata Property via Tag
- Add or Update Metadata Properties Satisfying a Predicate
From the repository root (adjust module / main class to the sample you are running):
mvn -q -DskipTests package
mvn -q exec:java -Dexec.mainClass="com.groupdocs.metadata.examples.<SampleClass>"Or open the project in IntelliJ IDEA / Eclipse and run the sample main method directly.
- Stay on-platform — generate Java code only; do not mix C#, Java, Python, and Node.js snippets from other GroupDocs.Metadata platforms unless the user explicitly asks for a comparison.
- Use canonical format count — say 110+ (link to the formats table); never invent
60+,70+, or50+counts. - Prefer samples in this repo — when adding or fixing examples, follow existing folder and naming conventions; reuse bundled sample files under
Examples/(or equivalent) when present. - License before full runs — evaluation builds work with limitations until
SetLicense/setLicenseis applied; document the license path when adding new entry points. - Link official docs — API details belong in https://reference.groupdocs.com/metadata/java/; keep AGENTS.md oriented to repository navigation and safe defaults.
- Do not commit secrets — license files, Cloud client secrets, and API keys stay out of git.
- Do not delete or rewrite bundled sample documents/images used by existing examples.
- Do not change the NuGet / Maven / PyPI / npm package id (
GroupDocs.Metadata) in install instructions. - Do not replace SDK entry types with Cloud SDK types (
MetadataApi, etc.). - Do not add unrelated GroupDocs products (Conversion, Viewer, etc.) unless the sample explicitly requires them.
- Do not remove evaluation/license setup from runnable entry points without an explicit maintainer request.