Skip to main content

PDF Document Annotations

  • 2 minutes to read

Use PDF annotations to add interactive or visual content to a document. You can use annotations to review documents, highlight text, draw shapes, create hyperlinks, attach files, or mark sensitive information for redaction.

The PDF Document API supports the following annotation categories:

Category Annotation Types
Markup Text markup (highlight, underline, strikeout, squiggly), text, free text, caret, shape (line, polyline, polygon, circle, square, ink), rubber stamp, file attachment, sound, redaction
Non-markup Link, popup, printer mark, watermark

Annotation Model

Each PDF document page maintains its own annotation collection.

Call the Page.getAnnotations() method to access a page’s annotations.

PdfDocument
    └── Pages
            └── Page
                    └── Annotations
                            ├── TextMarkupAnnotation
                            ├── FreeTextAnnotation
                            ├── CircleAnnotation
                            ├── LinkAnnotation
                            ├── RedactionAnnotation
                            └── ...

Use the annotation collection to:

  • Create annotations
  • Access existing annotations
  • Modify annotation settings
  • Remove annotations

Annotation Types

The PDF Document API supports the following annotation types:

Annotation Type Purpose
Markup Add comments, place text on a page, mark content for redaction, or indicate document status with stamps.
Text Markup Highlight, underline, strike out, or mark text with a squiggly line.
Drawing Draw lines, rectangles, circles, polygons, polylines, or freehand ink.
Document Navigation Navigate to another location in the document or open a web page.
File and Multimedia Attach files or associate sound with a document.
Printing and Production Add content used during printing or production, such as watermarks, printer marks, or trap networks.

Next Steps

See Also