Some test text!

Moving pages

Pages in the PDF document can be reordered using the movePages function.

viewerElement.addEventListener('documentLoaded', function() {   
  var docViewer = myWebViewer.getInstance().docViewer;
  var doc = docViewer.getDocument();
  var page1 = 1, page2 = 2, page3 = 3;

  var pagesToMove = [page2, page3];
  var insertBefore = page1;

  doc.movePages(pagesToMove, insertBefore).then(function(pagesArray) {
    // pages are now in the order of [page2, page3, page1];
  });
});

Get the answers you need: Support