Removing the comment button on the toolbar

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

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

Code snippet

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"]);

Hello abhirup,

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

Best regards,
Tyler

1 Like

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

Hello abhirup,

We have a guide here from our sister-product:

Best regards,
Tyler

1 Like