# JavaScript PDF annotation library

Nutrient Web SDK is a JavaScript library for creating, removing, and editing PDF annotations. It offers developers a robust API for programmatic annotation management, as well as a beautiful UI for working with 17 PDF annotation types.

[Try for free](https://www.nutrient.io/sdk/web/getting-started.md)

[Launch demo](https://www.nutrient.io/demo/annotations/)

## Limitations and known issues

- **Annotation types** — Not all PDF annotation types are supported (for example, sound, movie, or 3D); unsupported types may be ignored or flattened on import.

- **Cross-platform rendering** — Appearance can vary slightly across browsers and devices for fonts, blend modes, and custom appearances; validate critical workflows on target platforms.

For detailed workarounds, see [troubleshooting](https://www.nutrient.io/guides/web/troubleshoot.md).

## What are annotations?

Content displayed as a PDF page isn’t suitable for easy editing, but the PDF specification defines a comprehensive set of objects that can be added to PDF pages without changing the page content. These objects are called annotations, and their purpose ranges from marking up page content to implementing interactive features such as forms.

[Learn more](https://www.nutrient.io/guides/web/annotations/introduction-to-annotations/what-are-annotations.md)

## Essential guides

---

**Supported annotation types**

Learn about the types of annotations supported by Nutrient

[Read more](https://www.nutrient.io/guides/web/annotations/introduction-to-annotations.md)

---

**Annotation data formats**

Learn about using external files to manage annotations

[Read more](https://www.nutrient.io/guides/web/annotations/introduction-to-annotations/data-formats.md)

---

**Geometry primitives**

Learn about the basic geometry data types exposed by Nutrient

[Read more](https://www.nutrient.io/guides/web/annotations/geometry.md)

---

**Working with annotations**

Learn how Nutrient loads annotations

[Read more](https://www.nutrient.io/guides/web/annotations/introduction-to-annotations/working-with-annotations.md)

---

**Annotation replies and reviews**

Learn about displaying annotation replies as threaded conversations

[Read more](https://www.nutrient.io/guides/web/annotations/comments-and-replies/replies.md)

---

**Flatten annotations**

How to flatten annotations and burn them into a PDF

[Read more](https://www.nutrient.io/guides/web/annotations/flatten.md)

## Synchronization

---

**Synchronization overview**

Learn about the different approaches to annotation syncing

[Read more](https://www.nutrient.io/guides/web/annotations/synchronization.md)

---

**Review persistence architecture**

Recommended server-backed architecture for collaborative review workflows

[Read more](https://www.nutrient.io/guides/web/annotations/synchronization/review-persistence-architecture.md)

---

**Storing annotation data**

Learn best practices for storing annotation data

[Read more](https://www.nutrient.io/guides/web/annotations/synchronization/storing-annotation-data.md)

---

**Concurrent user conflict resolution**

Learn best practices for conflict resolution with concurrent users

[Read more](https://www.nutrient.io/guides/web/annotations/synchronization/conflict-resolution.md)

## Saving and storing annotations

---

**Saving annotations overview**

Learn the two ways Nutrient allows making changes to documents

[Read more](https://www.nutrient.io/guides/web/annotations/save/overview.md)

---

**Embed annotations into a PDF**

How to embed annotations into a PDF document

[Read more](https://www.nutrient.io/guides/web/annotations/save/embed-into-pdf.md)

---

**Save annotations to external storage**

How to save annotations to external storage

[Read more](https://www.nutrient.io/guides/web/annotations/save/to-external-storage.md)

---

**Auto save annotations**

How to configure the way changes are automatically saved

[Read more](https://www.nutrient.io/guides/web/annotations/annotation-saving-mechanism.md)

## Import and export

---

**Choose a persistence strategy**

How to choose Instant JSON vs. XFDF vs. server-backed sync

[Read more](https://www.nutrient.io/guides/web/annotations/import-and-export/choose-persistence-strategy.md)

---

**With Document Engine**

How to import/export annotations to/from Web with Document Engine

[Read more](https://www.nutrient.io/guides/web/annotations/import-and-export/server-backed.md)

---

**To/from Instant JSON**

How to import/export annotations to/from Instant JSON

[Read more](https://www.nutrient.io/guides/web/importing-exporting/instant-json.md)

---

**To/from XFDF**

How to import/export annotations to/from XFDF

[Read more](https://www.nutrient.io/guides/web/importing-exporting/xfdf-support.md)

---

**To/from a database**

How to import/export annotations to/from a database

[Read more](https://www.nutrient.io/guides/web/annotations/import-and-export/database.md)

## Create, edit, remove

---

**Create an annotation**

How to create an annotation

[Read more](https://www.nutrient.io/guides/web/annotations/create-edit-and-remove/create.md)

---

**Edit an annotation**

How to edit an annotation

[Read more](https://www.nutrient.io/guides/web/annotations/create-edit-and-remove/edit.md)

---

**Remove an annotation**

How to remove an annotation

[Read more](https://www.nutrient.io/guides/web/annotations/create-edit-and-remove/remove.md)

---

**Annotation permissions**

How to configure annotation editing permissions

[Read more](https://www.nutrient.io/guides/web/annotations/create-edit-and-remove/permissions.md)

---

**Add an image annotation**

How to add an image to a PDF as an annotation

[Read more](https://www.nutrient.io/guides/web/annotations/create-edit-and-remove/add-image.md)

---

**Detect changes to annotations**

How to detect annotation changes that originate from the UI

[Read more](https://www.nutrient.io/guides/web/annotations/detecting-if-annotations-have-changed.md)

---

**Annotation flags**

How to configure annotation behavior and capabilities

[Read more](https://www.nutrient.io/guides/web/annotations/annotation-flags.md)

---

**Undo and redo**

Learn about undo and redo functionality for annotations

[Read more](https://www.nutrient.io/guides/web/annotations/create-edit-and-remove/undo-redo.md)

---

**Annotation author name**

How to configure the author name for annotations

[Read more](https://www.nutrient.io/guides/web/annotations/annotation-author-name.md)

---

**Stamp configuration**

How to create a custom stamp

[Read more](https://www.nutrient.io/guides/web/annotations/stamp-annotation-configuration.md)

---

**Link annotations**

How to create, detect, and customize link annotations

[Read more](https://www.nutrient.io/guides/web/annotations/link-annotations.md)

---

**Annotate on an image**

How to annotate a PNG, JPG, or TIFF

[Read more](https://www.nutrient.io/guides/web/annotations/annotate-on-images/create-edit-and-remove.md)

## Customization

---

**Customize annotation display logic**

How to configure the logic used to display annotations in the viewer

[Read more](https://www.nutrient.io/guides/web/best-practices/business-logic.md)

---

**Customize appearance streams**

How to render existing appearance streams

[Read more](https://www.nutrient.io/guides/web/annotations/appearance-streams.md)

---

**Annotation customization**

How to create a custom annotation

[Read more](https://www.nutrient.io/guides/web/annotations/custom-rendered-annotations.md)

---

**Hiding annotations**

How to hide individual annotations or annotation types

[Read more](https://www.nutrient.io/guides/web/annotations/customization/hiding-annotations.md)

---

**Customize default properties**

How to configure the default value for annotation properties

[Read more](https://www.nutrient.io/guides/web/customizing-the-interface/using-annotation-presets.md)

---

**Store custom data in an annotation**

How to store and process custom data inside an annotation

[Read more](https://www.nutrient.io/guides/web/annotations/custom-data-in-annotations.md)

## More annotation guides

---

**PDF actions support**

Learn about the PDF actions supported by Nutrient

[Read more](https://www.nutrient.io/guides/web/annotations/pdf-actions.md)

---

**Stamp a document with built-in stamps**

How to stamp a document programmatically or with the UI

[Read more](https://www.nutrient.io/guides/web/features/stamp-annotation-templates.md)

---

**Image document specification**

Learn how PNGs, JPGs, and TIFFs are annotated by Nutrient

[Read more](https://www.nutrient.io/guides/web/annotations/annotate-on-images/specification.md)

---

**Headless annotation**

How to annotate PDFs without presenting the UI

[Read more](https://www.nutrient.io/guides/web/annotations/headless.md)

## Framework support

Nutrient Web SDK is compatible with any JavaScript framework, including React, Angular, Vue.js, Svelte, Next.js, TypeScript, Nuxt.js, and Blazor. It’s also compatible with ASP.NET, PHP, Laravel, and HTML5.

**Call to Action**

Start your free trial for unlimited access and expert support.

[Learn More](https://www.nutrient.io/sdk/web/getting-started/other-frameworks/javascript.md)
---

## Related pages

- [Rotate PDF annotations using JavaScript](/guides/web/annotations/annotation-rotation.md)
- [Flattening annotations in PDFs](/guides/web/annotations/flatten.md)
- [Headless PDF annotation](/guides/web/annotations/headless.md)

## Pages in this section

- [Reply to annotations in our JavaScript PDF viewer](/guides/web/annotations/comments-and-replies/replies.md)
- [Adding comments and replies in our JavaScript PDF viewer](/guides/web/annotations/comments-and-replies/comments.md)
- [Auto saving annotations](/guides/web/annotations/annotation-saving-mechanism.md)
- [Save annotations to external storage](/guides/web/annotations/save/to-external-storage.md)
- [Saving PDF annotations](/guides/web/annotations/save/overview.md)
- [Embedding annotations in a PDF](/guides/web/annotations/save/embed-into-pdf.md)
- [Adding annotations to images using JavaScript](/guides/web/annotations/annotate-on-images/create-edit-and-remove.md)
- [Enhance your image annotation experience effortlessly](/guides/web/annotations/annotate-on-images/specification.md)
- [Adding stamp annotations to PDFs using JavaScript](/guides/web/features/stamp-annotation-templates.md)
- [Customizing stamp annotations](/guides/web/annotations/stamp-annotation-configuration.md)
- [Annotation appearance streams](/guides/web/annotations/appearance-streams.md)
- [Annotation customization](/guides/web/annotations/custom-rendered-annotations.md)
- [Annotation notes](/guides/web/annotations/customization/annotation-notes.md)
- [Configuring annotation presets in our viewer](/guides/web/customizing-the-interface/using-annotation-presets.md)
- [Store custom data in annotations](/guides/web/annotations/custom-data-in-annotations.md)
- [Hiding annotations in our viewer](/guides/web/annotations/customization/hiding-annotations.md)
- [Customizing display logic for annotations](/guides/web/best-practices/business-logic.md)
- [Add image annotations to PDFs using JavaScript](/guides/web/annotations/create-edit-and-remove/add-image.md)
- [Annotation flags](/guides/web/annotations/annotation-flags.md)
- [Cut, copy, paste, and duplicate annotations in PDF using JavaScript](/guides/web/annotations/create-edit-and-remove/cut-copy-duplicate.md)
- [Defining the author of an annotation](/guides/web/annotations/annotation-author-name.md)
- [Detect changes in annotations](/guides/web/annotations/detecting-if-annotations-have-changed.md)
- [Create PDF annotations using JavaScript](/guides/web/annotations/create-edit-and-remove/create.md)
- [Customizing annotation permissions](/guides/web/annotations/create-edit-and-remove/permissions.md)
- [Edit PDF annotations using JavaScript](/guides/web/annotations/create-edit-and-remove/edit.md)
- [Select PDF annotations using JavaScript](/guides/web/annotations/create-edit-and-remove/multiple-selection.md)
- [Remove PDF annotations using JavaScript](/guides/web/annotations/create-edit-and-remove/remove.md)
- [Rich text in PDF annotations using JavaScript](/guides/web/annotations/create-edit-and-remove/rich-text.md)
- [Undo and redo annotations](/guides/web/annotations/create-edit-and-remove/undo-redo.md)
- [How to choose Instant JSON vs. XFDF vs. server-backed sync](/guides/web/annotations/import-and-export/choose-persistence-strategy.md)
- [Importing and exporting annotations in a database](/guides/web/annotations/import-and-export/database.md)
- [Importing and exporting annotations with Instant JSON](/guides/web/importing-exporting/instant-json.md)
- [Importing and exporting annotations with Document Engine](/guides/web/annotations/import-and-export/server-backed.md)
- [Importing and exporting annotations in XFDF](/guides/web/importing-exporting/xfdf-support.md)
- [Supported annotation types](/guides/web/annotations/introduction-to-annotations.md)
- [Comparing XFDF and Instant JSON for annotations](/guides/web/annotations/introduction-to-annotations/data-formats.md)
- [Geometry primitives](/guides/web/annotations/geometry.md)
- [Display embedded audio and video files in PDFs using JavaScript](/guides/web/annotations/introduction-to-annotations/media-annotations.md)
- [What are PDF annotations?](/guides/web/annotations/introduction-to-annotations/what-are-annotations.md)
- [Working with annotations](/guides/web/annotations/introduction-to-annotations/working-with-annotations.md)
- [Supporting link annotations in PDFs using JavaScript](/guides/web/annotations/link-annotations.md)
- [PDF annotation actions support](/guides/web/annotations/pdf-actions.md)
- [Conflict resolution when synchronizing annotations](/guides/web/annotations/synchronization/conflict-resolution.md)
- [Synchronizing annotations across users, devices, and sessions](/guides/web/annotations/synchronization.md)
- [Review persistence architecture](/guides/web/annotations/synchronization/review-persistence-architecture.md)
- [Storing annotation data](/guides/web/annotations/synchronization/storing-annotation-data.md)

