GroupDocs.Annotation for Java

groupdocs-annotation-java-home Maven Central package

Release notes Download from Maven Online app

GroupDocs.Annotation for Java is a document annotation API that adds, edits, and removes annotations and markup across many document formats. It provides a unified, format-independent interface to draw area and shape annotations, mark up text with highlights, underlines, strikeouts, and squiggly lines, stamp watermarks, images, and hyperlinks, add editable text fields, and attach threaded review comments — then save the result back to its original format with optional page-range and annotation-type filters.

Quick example

// Add an area annotation to the first page of a PDF
Annotator annotator = new Annotator("input.pdf");
try {
    AreaAnnotation area = new AreaAnnotation();
    area.setBox(new Rectangle(100, 100, 200, 80));  // x, y, width, height
    area.setPageNumber(0);                           // 0-based page index
    area.setBackgroundColor(65535);                  // ARGB integer
    area.setMessage("Review this section");
    annotator.add(area);
    annotator.save("annotated.pdf");
} finally {
    annotator.dispose();
}

Features

  • Shape Annotations: Draw area, ellipse, arrow, point, distance, and polyline annotations with configurable color and opacity.
  • Text Markup: Highlight, underline, strikeout, and squiggly-mark text, replace or redact text, and redact embedded resources.
  • Content Annotations: Stamp watermarks, image annotations, hyperlinks, and editable text fields onto a document.
  • Comments & Replies: Attach threaded review comments to any annotation with user and timestamp information.
  • Manage Annotations: List, update, and remove annotations — all of them or filtered by annotation type.
  • Save Filters: Render only selected annotation types or a specific page range when saving the result.

Supported File Formats

GroupDocs.Annotation supports a wide range of file formats. For a complete list, see the full list of supported formats.

  • Microsoft Office (Word, Excel, PowerPoint)
  • PDF
  • Images (JPEG, PNG, BMP, TIFF)
  • CAD (DWG, DXF)
  • Visio Diagrams (VSD, VSDX)
  • Email (EML, EMLX)
  • OpenDocument (ODT, ODS, ODP)

Getting Started

To get started, refer to the System Requirements, Supported File Formats, Installation, and How to Run Examples sections for setup instructions and your first annotation.

Developer Guide

For practical code examples covering basic and advanced annotation, see the Basic Usage and Advanced Usage sections. They walk through loading documents, adding every annotation type, attaching comments and replies, listing and removing annotations, and saving results with page-range and annotation-type filters.

Technical Support

If you experience any issues or have suggestions, use the GroupDocs Free Support Forum or the Paid Support Helpdesk. For licensing and evaluation questions, see Licensing and Subscription.

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.