How to Create an Acrobat Button That Skips Two Pages
Question details
The user needs to configure a custom button within a PDF file that automatically jumps forward by two pages when clicked.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Designing interactive PDF forms or checklists where users need to bypass specific annotation or instruction pages.
- Observed behavior
- The standard navigation settings only allow jumping to the next page or a specific fixed page, requiring a custom action to skip exactly two pages relative to the current position.
Ensure you are using the desktop version of Adobe Acrobat Pro or Standard, as free PDF readers generally do not support creating or editing form fields and JavaScript actions.
Use JavaScript to Advance Two Pages
You can assign a custom JavaScript action to a PDF button that reads the current page number and adds two to it, jumping the viewer forward.
Adobe Acrobat uses a zero-based numbering system for pages in its JavaScript API, meaning the first page is considered page 0. However, the calculation 'this.pageNum + 2' will still correctly advance the view by exactly two pages regardless of the starting point.
Open your document in Adobe Acrobat, select 'Tools' > 'Prepare Form'. Click the 'Button' icon in the toolbar, click on the document to place it, and double-click the new button to open the Properties dialog.
Navigate to the 'Actions' tab in the Button Properties window. Choose 'Mouse Up' from the Select Trigger dropdown menu.
In the 'Select Action' dropdown, choose 'Run a JavaScript' instead of the default navigation options, then click the 'Add' button to open the JavaScript Editor.
In the editor window, type exactly: 'this.pageNum = this.pageNum + 2;'. Click 'OK' to save the script, then click 'Close' on the properties window.
Exit the 'Prepare Form' editing mode by clicking 'Close' at the top right. Click your newly created button to verify that it skips two pages forward.

Easily Link to Any PDF Page with WPS Office
If you want a simpler way to navigate through PDFs without writing or debugging JavaScript code, WPS Office allows you to easily insert hyperlinked areas to jump exactly where you need to go.
- 1. Open your PDF: Launch WPS Office and open the PDF document you want to add navigation to.
- 2. Insert a link: Navigate to the 'Edit' tab on the top ribbon and select 'Link' > 'Add/Edit Link'.
- 3. Draw the clickable area: Click and drag to draw a rectangle over the text or image you want to act as your navigation button.
- 4. Set the target page: In the popup window, select 'Go to a page view', scroll to the specific page you want to jump to, and click 'Set Link'.

Frequently Asked Questions
Can I use JavaScript to make a button skip backward instead of forward?
Yes. You can use the exact same process but change the JavaScript code to 'this.pageNum = this.pageNum - 2;' to move backward by two pages.
Will this JavaScript button work on mobile PDF viewers?
Support for PDF JavaScript is very limited on mobile devices. While it will work perfectly on desktop versions of Adobe Acrobat and standard PC PDF readers, mobile apps (like iOS or Android viewers) may ignore the JavaScript action entirely.
Why is my Acrobat button not executing the JavaScript when clicked?
First, ensure you are out of the 'Prepare Form' editing mode, as buttons cannot be triggered while editing. Secondly, verify that JavaScript is enabled in your software by going to Edit > Preferences > JavaScript and checking 'Enable Acrobat JavaScript'.




