Force tool button panToolButton starting enabled by default

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