2 Replies Latest reply on Jul 25, 2011 7:58 AM by gkaiseril

    How to setFocus current page?

    Maseuko

      Hello!

       

      I'm newb soo sorry for my mistakes.

       

      As in the title, I need setFocus my current page...

       

      Something like getPage?

       

      Is it possible?

       

      using Acrobat 9.0 pro..

       

      Ty for help!

        • 1. Re: How to setFocus current page?
          BarlaeDC Level 4

          Hi,

           

          You could use

           

          this.pageNum = 0; // any integer for 0 to number of pages -1

           

          on a button, bookmark, or wherever you would like

           

          Hope this helps

           

          Malcolm

          1 person found this helpful
          • 2. Re: How to setFocus current page?
            gkaiseril MVP & Adobe Community Professional

            PDF use a zero based numbering system for pages. The first page is page zero, 0, or the logical page -1.

             

            You can go to any page with JavaScirpt using the 'pageNum' property which is an integer and you can read or write this data.  Writing or setting the value of this properyt will navigate one to that page number.

             

            Since the pageNum is an integer, you can increment it or decrement it to move to the next or previous page. You can use the numPages property to navigate to the last page.

             

            this.pageNum = 0; // goto first page

            this.pageNum++; // advance to next page

            this.pageNum--; // goto previous page

            this.pageNum = this.numPages - 1; // go to last page of PDF

            1 person found this helpful