Which product are you using?
PDF.js Express Plus
PDF.js Express Version
8.6.0
Detailed description of issue
Hi team,
Currently, if we zoom in outside the document, it will force zoom to the “center” of the document and then zoom to mouse after certain conditions.
Is there any example / API to zoom to mouse outside the document area?
I need this feature because sometimes we need to zoom in on the edge of the document.
Please see example video below compared with Bluebeam:
Thanks
Expected behaviour
Can zoom freely according to the direction of the pointer even in outside of the doc area.
kkim
3
Hi there,
To zoom to mouse, please use the documentViewer.zoomToMouse API:
PDFJS Express WebViewer Class: DocumentViewer(zoom%2C%20offsetX%2C%20offsetY
best regards,
Kevin Kim
Hi @kkim
Thanks for the response. Yes, I use that API but it has not been successful yet.
How about the ability to drag and move (pan) the document on the “unlimited-size” of viewer boundary?
example:
Can this be achieved using custom DisplayMode?
Thanks
kkim
5
Hi there,
The available APIs for the custom display modes are here:
https://pdfjs.express/api/Core.DisplayMode.html#setCustomFunctions__anchor
We don’t have an API to set the document on the ‘unlimited size’ view.
If you zoom out of the document and then use the pan tool, you can scroll up or down but not in side ways because the document is ‘centred’
Best regards,
Kevin Kim