# Removing the comment button on the toolbar

**URL:** <https://pdfjs.community/t/removing-the-comment-button-on-the-toolbar/3362>\
**Category:** Technical Support\
**Created:** [July 25, 2024, 6:04am UTC](https://pdfjs.community/t/removing-the-comment-button-on-the-toolbar/3362 "2024-07-25T06:04:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhirup](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@abhirup](https://pdfjs.community/u/abhirup)\
**Post date:** [July 25, 2024, 6:04am UTC](https://pdfjs.community/t/removing-the-comment-button-on-the-toolbar/3362/1 "2024-07-25T06:04:39Z")

</div>

**Which product are you using?**

**PDF.js Express Version**

**Detailed description of issue**  
Hello everyone, I am trying to disable the comment button on the toolbar but unable to do that. As per my understanding it will look something like instance.UI.disableElements([‘’]); but unable to decide the element name. Please guide. Thanks.

**Expected behaviour**  
{Provide a screenshot or description of the expected behaviour}  
 ![image](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/2X/d/db6b60b40011d3bf03dd6ae095a5af21f30b29f5.png)

**Does your issue happen with every document, or just one?**  
Every document

**Code snippet**

```javascript
instance.UI.disableElements(['fullscreenButton']);
instance.UI.disableFeatures([instance.UI.Feature.Print]);
instance.UI.disableElements(['ribbons']);
instance.UI.disableElements(['panToolButton']);
instance.UI.disableElements(['toolsHeader']);
instance.UI.disableElements(["language", "languageButton"]);
instance.UI.disableElements(["selectTool", "selectToolButton"]);

```

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [July 26, 2024, 5:56pm UTC](https://pdfjs.community/t/removing-the-comment-button-on-the-toolbar/3362/3 "2024-07-26T17:56:52Z")

</div>

Hello abhirup,

Try:  
instance.UI.disableElement(‘toggleNotesButton’)

Best regards,  
Tyler

---

<div class="post-metadata">

**Author:** ![abhirup](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@abhirup](https://pdfjs.community/u/abhirup)\
**Post date:** [July 29, 2024, 10:09am UTC](https://pdfjs.community/t/removing-the-comment-button-on-the-toolbar/3362/4 "2024-07-29T10:09:40Z")

</div>

> [@tgordon](#):
>
> instance.UI.disableElement(‘toggleNotesButton’)

Thanks a lot Tyler. It worked. Also can you please guide how to know the toolbar button names exactly so that I can easily modify the toolbar when needed.

Best regards,  
Abhirup

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [July 29, 2024, 3:59pm UTC](https://pdfjs.community/t/removing-the-comment-button-on-the-toolbar/3362/5 "2024-07-29T15:59:47Z")

</div>

Hello abhirup,

We have a guide here from our sister-product:

> **[Hiding-elements | Apryse Documentation](https://docs.apryse.com/documentation/web/guides/hiding-elements/)**
>
> World's #1 PDF SDK Library for Web, Mobile, Server, Desktop

Best regards,  
Tyler
