Up/Down arrow for navigating pages

Hi,
Greetings!

Is it possible to have a page navigation arrow in header tools.

If not plz suggest any other option to add tool option
for navigating page.

Regards
Abhishek Maurya

Hi!

Yes, this is doable by adding custom header buttons to the UI. Documentation can be found here.

You can use the getCurrentPage and setCurrentPage APIs to pick which page to jump to.

It might look something like this:

WebViewer(...)
  .then(function(instance) {
    const {docViewer} = instance;
    instance.setHeaderItems(function(header) {
      header.push({
        type: 'actionButton',
        img: '<svg>{svg_down_arrow}</svg>',
        onClick: function() {
             docViewer.setCurrentPage(docViewer.getCurrentPage() + 1)
        }
      });
    });
  });

Thanks!
Logan