This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/android/annotations/replies.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Review and reply to PDF annotations on Android | Nutrient SDK

Annotation replies enable users to discuss changes inside a document. Nutrient provides APIs for accessing replies and user interface (UI) components for viewing and editing them.

Author-specific annotation states enable users to review proposed changes. For example, a state records whether an author agrees or disagrees with a change.

Nutrient supports viewing, searching, and adding replies and reviews. The model API provides programmatic access for custom features. Nutrient follows the PDF specification for annotation replies and states, maintaining compatibility with Adobe Acrobat Reader.

For server-based collaboration, use Instant comments instead of storing replies in a PDF. Refer to the Instant synchronization guide and the Instant comments guide.

Terminology

The following terms describe replies and reviews:

  • Reply — An annotation that references a parent annotation through its in-reply-to property.
  • Text reply — A reply without an author-specific state.
  • State reply or state annotation — A reply with an author-specific state.
  • Review — A state reply whose author-specific state belongs to the review state model (category).
  • Comments — An annotation and its text replies, primarily a user-facing term. The first comment displays the parent annotation’s contents.

Licensing

Replies requires a separate component in your Nutrient license. Without this component, your app can’t view, search, or add annotation replies. Contact Sales to add this component to your license.

Third-party compatibility

The PDF 1.6 specification introduced replies, which work with Adobe Acrobat(opens in a new tab). Support varies across other PDF viewers: Some don’t display all replies or status information.

Instant JSON doesn’t support annotation replies.

Screenshot of comments in Adobe Acrobat

User interface

To open an annotation’s comments, follow these steps:

  1. Tap the annotation.
  2. Tap the note button in the popup toolbar.

The note editor displays the annotation’s comments and their reviews. Users can add or edit comments and add reviews. As with other annotations, users can edit comments from other authors.

Nutrient displays nested replies in a single list sorted by date.

Disabling the replies and reviews UI

To disable viewing and adding replies and reviews, set annotationReplyFeatures(AnnotationReplyFeatures.DISABLED) in the PdfConfiguration builder. This setting applies when your license includes annotation replies:

val configuration = PdfConfiguration.Builder().annotationReplyFeatures(AnnotationReplyFeatures.DISABLED).build()

Pass the configuration when creating your PdfFragment. For PdfActivity, call the same method on PdfActivityConfiguration.Builder instead.

Model API

Replies are annotations that reference a parent annotation through Annotation#getInReplyTo(). The PDF stores this reference in the annotation dictionary’s IRT entry. Parent annotations don’t directly reference their replies.

To find an annotation’s replies, search all annotations on the same page. Nutrient’s UI performs this search for you.

A separate text annotation stores each author-specific state, and it references the original annotation through Annotation#getInReplyTo(). Each time a user changes the state, Nutrient creates a note annotation that replies to the original annotation.

To find all states associated with an annotation, search the page’s annotations for references to that annotation. Nutrient’s UI also handles this search.

Queries for a page’s annotations include replies. Use Annotation#isReply() to check whether an annotation is a reply. This check doesn’t require the Replies license component.

With the Replies license component, use Annotation#getInReplyTo() to read a reply’s parent annotation. To set the parent annotation, use Annotation#setInReplyTo(Annotation annotation).