luigi
1
Which product are you using?
PDF.js Express Viewer
PDF.js Express Version
PDF.js Express Free Viewer
Detailed description of issue
Programmatically in javascript I want “click” or enabled tool button “panToolButton”
Expected behaviour
Does your issue happen with every document, or just one?
Every
Link to document
nop
Code snippet
nop
system
3
Hello, I’m Ron, an automated tech support bot
While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:
Guides:
APIs:
Forums:
1 Like
Hi Luigi,
Thanks for your question.
Here is a code snippet to help you enable the panToolButton.
import WebViewer from '@pdftron/pdfjs-express-viewer'
WebViewer({
...options
}).then(instance => {
const { Tools } = instance.Core;
const panTool = Tools.ToolNames.PAN;
instance.UI.setToolMode(panTool);
})
Hope this helps and let me know if this approach works for you.
Thank you,
Dandara
2 Likes
luigi
5
Hi Dandara!!! Sounds good and works perfectly!!! Thanks!!! You win a “paella valenciana”, I’m from Valencia (Spain) . See you my next problem.
2 Likes