How to register a custom tool when building our own UI

Product: @pdftron/webviewer

Product Version: 8.0.0

Please give a brief summary of your issue:
Adding a custom tool when building my own UI

Please describe your issue and provide steps to reproduce it:
I don’t find any documentation on how I can add custom tools (In my case a custom stamp tool) when I am building my own UI (using webviewer Core). All the examples I found use the UI module (registerTool method) that is not available when building my own UI. Please help me :).

Please provide a link to a minimal sample where the issue is reproducible: N/A

Aside from creating and managing the tool yourself, you can see how the registration is done with our UI and the document viewer in the open-source UI repo: webviewer-ui/registerTool.js at 9bbd6b7175c6a78c91c2387b30d6a83332b8032c · PDFTron/webviewer-ui · GitHub. The API being called should be this one: PDFTron WebViewer Class: DocumentViewer.

Let me know if this helps!

1 Like