5 Replies Latest reply on Aug 13, 2015 8:04 AM by Bernd Alheit

    Delete all pages except currently viewed?? Acrobat Javascript

      Hello All,

      I need to delete all pages in a PDF except the one that is currently being viewed. I thought I had it with this:

      var keepPage=this.pageNum
      this.deletePages({nStart: keepPage+1, nEnd: this.numPages -1});
      var keepPage=this.pageNum
      this.deletePages({nEnd: keepPage -1});

      But this only works if you are on a page other than the last page.

      I appreciate any help.