Hello, I’m AiRon, an automated tech support bot ![]()
While you wait for one of our customer support representatives, I can help you with your question.
To control the exact position and zoom level of a PDF page in Apryse’s WebViewer, particularly for implementing custom features like a Pan tool or saving specific views, you can use a combination of methods. The key is to manipulate the scroll position and zoom level of the document viewer to achieve your desired view.
Some things you can try:
- Use the
instance.docViewer.getScrollViewElement()method to access the scrollable element of the document viewer. You can then set the scroll position using JavaScript. - Utilize the
instance.setZoomLevel()method to set the zoom level of the viewer. - For precise positioning, calculate the scroll position based on the current zoom level and the desired page coordinates.
- If you want to save and restore views, store the current scroll position and zoom level, then apply them when needed.
Here are some resources that might help you:
- Adjusting Layout and Zoom - Learn about different display modes and zoom settings.
- JavaScript PDF Viewer Library - Understand the core viewing operations and customization options.
- Get Started with Full API - Explore how to set up custom code for manipulating the viewer.
- Annotation Tools for Your Viewer - Learn about custom tools and how to implement them.
Hopefully, this helps you solve your problem while you wait for a human to get back to you.