> 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/ui-customization/hide-annotations-notes-panel.md).

# Hiding certain annotations in WebViewer notes panel

Learn how to selectively show annotations in the notes panel with WebViewer. Configure settings to hide specific annotations using Listable property or setCustomNoteFilter API. Optimize your notes pan

Sometimes it is useful to display only a subset of annotations in the notes panel. This guide talks about how the notes panel can be configured to hide certain annotations by using the annotation's [Listable](https://sdk.apryse.com/api/web/Core.Annotations.Annotation.html#Annotation__anchor) property or the [setCustomNoteFilter](https://sdk.apryse.com/api/web/UI.html#setCustomNoteFilter__anchor) API.

## Listable

[Listable](https://sdk.apryse.com/api/web/Core.Annotations.Annotation.html#Annotation__anchor) is a property that exists on all types of annotations. It controls if an annotation should be shown in the notes panel. The following example shows how you can hide all rectangle annotations.

{% tabs %}
{% tab title="JavaScript (SDK v8.0+)" %}
{% code lineNumbers="true" %}

```js
WebViewer({
  // your constructor options here
}, viewerElement)
  .then(instance => {
    const { annotationManager } = instance.Core;

    annotationManager.addEventListener('annotationChanged', (annotations, action) => {
      if (action === 'add') {
        const rectangles = annotations.filter(annot => annot instanceof instance.Core.Annotations.RectangleAnnotation);

        rectangles.forEach(rectangle => {
          rectangle.Listable = false;
        });

        annotationManager.drawAnnotationsFromList(rectangles);
        annotationManager.trigger('annotationChanged', [rectangles, 'modify']);
      }
    })
  });
```

{% endcode %}

[AnnotationManager.drawAnnotationsFromList](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#drawAnnotationsFromList__anchor) [AnnotationManager#annotationChanged](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#event:annotationChanged__anchor)
{% endtab %}

{% tab title="JavaScript (SDK v6.0+)" %}
{% code lineNumbers="true" %}

```js
WebViewer({
  // your constructor options here
}, viewerElement)
  .then(instance => {
    const { annotManager } = instance;

    annotManager.on('annotationChanged', (annotations, action) => {
      if (action === 'add') {
        const rectangles = annotations.filter(annot => annot instanceof instance.Annotations.RectangleAnnotation);

        rectangles.forEach(rectangle => {
          rectangle.Listable = false;
        });

        annotManager.drawAnnotationsFromList(rectangles);
        annotManager.trigger('annotationChanged', [rectangles, 'modify']);
      }
    })
  });
```

{% endcode %}

[AnnotationManager.drawAnnotationsFromList](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#drawAnnotationsFromList__anchor) [AnnotationManager#annotationChanged](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#event:annotationChanged__anchor)
{% endtab %}
{% endtabs %}

## setCustomNoteFilter

An annotation will neither appear in thumbnails nor show in the printed document if it's not [Listable](https://sdk.apryse.com/api/web/Core.Annotations.Annotation.html#Annotation__anchor). Sometimes we may just want to customize the notes panel and leave other components untouched. In this case, [setCustomNoteFilter](https://sdk.apryse.com/api/web/UI.html#setCustomNoteFilter__anchor) is the right choice.

{% tabs %}
{% tab title="JavaScript (SDK v8.0+)" %}
{% code lineNumbers="true" %}

```js
WebViewer({
  // your constructor options here
}, viewerElement)
  .then(instance => {
    // only show non-rectangle annotations
    instance.UI.setCustomNoteFilter(annot => !(annot instanceof instance.Core.Annotations.RectangleAnnotation))
  });
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript (SDK v6.0+)" %}
{% code lineNumbers="true" %}

```js
WebViewer({
  // your constructor options here
}, viewerElement)
  .then(instance => {
    // only show non-rectangle annotations
    instance.setCustomNoteFilter(annot => !(annot instanceof instance.Annotations.RectangleAnnotation))
  });
```

{% 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/ui-customization/hide-annotations-notes-panel.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.
