Set toolMode to sticky note in angular

Product: webViewer

Product Version: 8.6.0

I’m customizing the header and I’m trying to toggle the sticky note Tool in angular with my own action and I can’t get it to work.

I’m using : instance.UI.setToolMode(‘STICKY’);

the code : instance.UI.setHeaderItems(header => {
type: ‘actionButton’,
img: ‘assets/comment.svg’,
onClick: () => {

I found this tool name here : PDFTron WebViewer Namespace: Tools

is it the right tool name ?
If so what can I try to solve this ?

Hi Rodolphe,

So that list of tool names is the correct variable but it must be accessed through Core.Tools.ToolNames.


This will return the correct tool to create.

Best Regards,
Zach Serviss
Web Development Support Engineer
PDFTron Systems, Inc.


thank you, it helped me to make it work.

my code :
const { documentViewer} = instance.Core;
stickyTool = documentViewer.getTool(instance.Core.Tools.ToolNames.STICKY);