Editing zoom step size

WebViewer Version: 8.2.0

Hi, I am trying to edit the step size of the zoom feature.
A user can zoom in or out using the zoom buttons or the mouse scroll + ctrl,
but the amount of change in % for every step does not fit our needs.
It currently zooms in\out by 25% using the buttons or 25%+ using the mouse scroll + ctrl.

How can that step size be edited?
I tried finding a way to override the onClick property of the buttons but didn’t find a proper way using the API.
I also tried removing those buttons and replacing them by my own but removing them requires removing the whole zoom overlay which also includes dropdown box and I would prefer not to implement it on my own.
And lastly I saw that it’s possible to use custom ui but again, I would prefer not to implement it on my own since the library already provides it.

Thanks

Hello, I’m Ron, an automated tech support bot :robot:

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:

Hello Arie,

Unfortunately, there is no such API at this time. I have added this item to our backlog to be looked at in the future.

For now, you would need to create a custom UI.
Here is a guide for that.

Here are the relevant files that you would likely need to change:
Files for zoom buttons:

File for zooming with scroll + ctrl:

Please let me know if there are any issues.

Best Regards,
Ahmad Moaaz
Software Developer
PDFTron Systems, Inc.
www.pdftron.com

1 Like