> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/annotation/annotation.md).

# WebViewer JavaScript PDF Annotation Library

Enhance PDF documents with the JavaScript PDF Annotation Library. Easily create, manage, and customize annotations using Apryse's Web SDK for seamless collaboration and document markup. The Apryse Web

In WebViewer annotations can be created both through the UI and programmatically.

![](https://3532544125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX9YnTSKIHvV7m0A36LbO%2Fuploads%2Fgit-blob-8e571c0ce8096fd7d63fd5a720fae753d7ee6269%2Fad0f1a14fe4ad5a5320eb4088330b3f92bd8f748-420x244.png?alt=media)

*Figure 1. Sticky annotation created on a document*

Annotations allow users to mark up and comment on PDFs without altering the original authors content.

Apryse SDK Benefits include:

* Infinite Undo/Redo
* Support for annotation flattening
* Support for annotation appearances
* XFDF Import
* Export annotations to FDF, XFDF, text, or PDF annotation summary
* Sticky (Note)
* Comments
* Text markup (highlight, squiggly, underline, strikeout)
* Add shapes (line, arrow, polyline, rectangle, ellipse, polygon, cloud)
* Cloud annotations
* Apply freehand ink annotations
* Signatures
* Save the annotations into the PDF file
* File attachments
* Sound, movie, and 3D annotations
* Support for custom annotations
* FreeText, Callout
* TextHighlight, TextUnderline, TextSquiggly, TextStrikeout
* Stamp
* Redaction

## Demos

[Stamp Annotations](https://showcase.apryse.com/pdf-stamps) [Create Custom Annotation](https://showcase.apryse.com/custom-annotations) [Annotation Permissions](https://showcase.apryse.com/annotation-permissions) [Measurement Tools](https://showcase.apryse.com/measurement-tools) [Annotation or Form Flatten](https://showcase.apryse.com/flatten-form) [XFDF Annotations](https://showcase.apryse.com/xfdf-annotations-in-pdf)

## Get started

[Importing and exporting annotations](/web/annotation/import-export.md) To import and export annotations with a PDF document.

[Add annotations](/web/annotation/create-annotations.md) To create annotations programmatically with a PDF document.

[Remove annotations](/web/annotation/remove-annotations.md) To remove annotations programmatically with a PDF document.

[Add custom annotations](/web/annotation/customize/custom-annotations.md) To create custom annotations programmatically with a PDF document.

[Flatten annotations](/web/annotation/flatten-annotations.md) To flatten annotations programmatically with a PDF document.

[A short introduction to XFDF file format](/web/annotation/xfdf.md) An introduction to XFDF file format.

[Annotation permissions](/web/annotation/annotationmanager/permissions.md) To control which users can modify which annotations.

[Annotation events/triggers](/web/events/events.md) To listen for annotation events and handle various callbacks.

[Annotation tools](/web/annotation/annotations-and-tools.md) An introduction to annotation tools.

[Custom annotation tools](/web/annotation/customizing-tools.md) To customize annotation tools for grouping, enable/disable, style changes, or behaviour enhancement

[Customize stamp annotation](/web/annotation/stamps.md) To customize stamp annotation tool for standard and custom stamps

[Default tool styles](/web/annotation/customizing-default-annotation-styles.md) To customize the default annotation style properties of tools.

[Add link to annotation](/web/annotation/add-link-to-annotation.md) To add a link to an existing annotation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.apryse.com/web/annotation/annotation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
