Skip to main content
Participant
October 28, 2020
Question

Ability to control zoom programmatically

  • October 28, 2020
  • 1 reply
  • 522 views

We have the need for an entirely customized UI, which would include hiding the zoom and page control toolbar. We are able to jump to page using the `gotoLocation` view API. However we need the ability to set zoom level programatically based on our own controls. `setZoom(currentZoom + .5)` or `setZoom(70%)`. Additionally we would need the ability to reset zoom to fit page and fit width. Basically a way to recreate the built in controls programatically. Is anything like this possible with the current exposed APIs or is it planned?

 

Thanks for the input!

This topic has been closed for replies.

1 reply

Adobe Employee
June 11, 2021

Sorry for the late response.

PDF Embed API provides a number of APIs to control the zoom-in/out functionality programmatically. Please have a look at this section, UI customization -> Viewer API -> Zoom APIs, in the official documentation.

Hope this helps.