> 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-attachments.md).

# Add attachments to PDF annotation

Enhance PDF annotations with attachments using WebViewer. Easily add files to notes and replies, with image previews and persistent attachments. Customize behaviors with WebViewer APIs. The Apryse Web

WebViewer supports attachments for annotations, and this currently enables attaching files to the replies in notes panel.

When adding a reply, the user can click the attachment icon to add attachments to their reply. If the file format is image-based, a preview will render.

![](https://3532544125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX9YnTSKIHvV7m0A36LbO%2Fuploads%2Fgit-blob-29c15514a8541daf5ad63430ca5a51c0d112c8e3%2F485c4c595b0caa5bcf17f09695fdb364e23a415c-542x496.png?alt=media)

After posting the reply, the attachments added will show with the note content. The attachments will persist after downloading.

![](https://3532544125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX9YnTSKIHvV7m0A36LbO%2Fuploads%2Fgit-blob-a3b3fa63f44d8370b6e1a134bbfc6acb43fdadd2%2F05f1c1fb06fd5f496a01caa55b546138a34a14b8-542x688.png?alt=media)

Clicking on the attachment will open it in a new tab inside WebViewer. Note that you need to enable the MultiTab feature first.

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
instance.UI.enableFeatures([instance.UI.Feature.MultiTab]);
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Relevant APIs

WebViewer provides some APIs for customizing the default behaviors.

### enableAttachmentPreview

The preview of attachments can be enabled by using [enableAttachmentPreview](https://sdk.apryse.com/api/web/UI.NotesPanel.html#.enableAttachmentPreview__anchor).

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
WebViewer(...)
  .then(function(instance) {
    instance.UI.NotesPanel.enableAttachmentPreview();
  });
```

{% endcode %}
{% endtab %}
{% endtabs %}

### disableAttachmentPreview

The preview of attachments can be disabled by using [disableAttachmentPreview](https://sdk.apryse.com/api/web/UI.NotesPanel.html#.disableAttachmentPreview__anchor).

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
WebViewer(...)
  .then(function(instance) {
    instance.UI.NotesPanel.disableAttachmentPreview();
  });
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
