How to Create an Accordion-Style Menu with Links in a PDF
Question details
The user wants to add an interactive, collapsible accordion-style menu to a PDF that reveals internal page links when clicked.

- Product
- Device & OS
- not provided
- Scenario
- Designing an interactive PDF document that requires advanced internal navigation through expandable menus.
- Observed behavior
- Needs to implement a clickable button that expands to display internal links, similar to web-based accordion menus.
Before creating an interactive menu, ensure your document is fully finalized in terms of page count and layout, as adding or deleting pages later might break the internal navigation links.
Create a Collapsible Menu Using Form Buttons
This method uses built-in form tools to show or hide secondary buttons (the menu items) when a primary button is clicked.
By leveraging the 'Show/hide a field' action in a PDF editor, you can create a functional accordion menu without writing any code. This requires setting up a main trigger button and multiple hidden buttons for your links.
Open your PDF editor, navigate to the Form tools, and add a Push Button. Label this button 'Menu' or your desired category name.
Add additional buttons below the main one for each page link. In their properties, set the initial visibility to 'Hidden'.
Right-click each hidden menu item button, go to Properties > Actions, and add an action to 'Go to a page view' for the respective destination in your PDF.
Right-click the main 'Menu' button, go to Actions, and add a 'Show/hide a field' action. Select the hidden menu item buttons and set them to 'Show' when the main button is clicked.

Implement a Pop-Up Menu via Acrobat JavaScript
For advanced users, writing custom JavaScript code can generate a dynamic pop-up menu without manually creating multiple hidden button fields.
Use the Built-in Bookmarks Panel
If interactive buttons face compatibility issues across different devices, standard PDF bookmarks offer a native accordion-like navigation structure.
Create Interactive PDFs with WPS Office
WPS PDF provides comprehensive tools to insert links, interactive form fields, and collapsible bookmarks, making it easy to build dynamic document navigation menus.
- 1. Open PDF in WPS: Launch WPS Office and open your PDF document to begin editing.
- 2. Insert Form Buttons: Go to the Form tab to insert push buttons to serve as your interactive menu interface.
- 3. Configure Link Actions: Use the button properties to set up internal links or show/hide actions for an accordion effect.
- 4. Organize Bookmarks: Alternatively, use the side panel to quickly build a nested, accordion-style bookmark list that works on all devices.

Frequently Asked Questions
Why doesn't my interactive PDF menu work on mobile devices?
Many mobile PDF viewers and web browsers have limited support for advanced interactive elements like JavaScript and show/hide form actions. For the best experience, view the document in a dedicated desktop PDF reader.
Can I create an accordion menu without using JavaScript?
Yes, you can use the 'Show/hide a field' action in button properties to toggle the visibility of other buttons, effectively creating a clickable accordion menu without writing any code.
Will my nested bookmarks carry over if I convert the PDF to Word?
No, PDF bookmarks and interactive form buttons are specific to the PDF format and will not function as an accordion menu if converted to a Word document.
How do I make the menu collapse again after opening?
You can add an additional action to the menu items that hides the fields once clicked, or create a specific 'Close Menu' button that triggers a hide action for the entire menu group.




