How to Create Custom Menus and Submenus in Adobe Acrobat Pro DC
Question details
The user wants to know how to create custom submenus within a custom menu in Adobe Acrobat Pro DC using JavaScript.

- Product
- Adobe Acrobat Pro DC
- Device & OS
- not provided
- Scenario
- Customizing the PDF viewer interface by adding new navigation menus or functional submenus via scripting.
- Observed behavior
- The user needs the exact JavaScript method and implementation steps to successfully generate a structured submenu within the application interface.
Ensure you have basic knowledge of Adobe Acrobat JavaScript and have enabled folder-level scripting permissions in your Acrobat Pro DC preferences.
Using Acrobat JavaScript to Add a Submenu
Utilize the app.addSubMenu method in a trusted script file to generate a structured submenu within Acrobat Pro DC.
Acrobat JavaScript provides a robust API for customizing the application interface. By using the app.addSubMenu method, developers can nest additional options under an existing or custom parent menu. Because modifying the application UI requires elevated privileges, this code must be placed in a trusted folder-level JavaScript file.
Navigate to your Acrobat Pro DC JavaScripts directory, typically located at C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\JavaScripts on Windows, or inside the application package contents on macOS.
Create a new text document in this folder and change its extension to .js (for example, customMenu.js). If prompted for administrator permissions, click Continue.
Open the .js file in a code editor and add the code: app.addSubMenu({ cName: "MySubMenu", cParent: "MyParentMenu", nPos: 0 }); Ensure the cParent matches the internal name of the menu you are attaching it to.
Use the app.addMenuItem method to populate the submenu, setting your new submenu's cName as the parent parameter for these items.
Save the customMenu.js file and restart Adobe Acrobat Pro DC to apply the changes and view your newly created custom menus.

Looking for an All-in-One Office and PDF Suite?
While advanced JavaScript UI customization is specific to Adobe Acrobat, WPS Office provides a powerful, built-in PDF editor alongside its Word, Excel, and PowerPoint alternatives. It's lightweight, free to use, and highly compatible with standard document formats.
- 1. Visit the WPS Office Website: Navigate to the official WPS website to locate the free installer for your operating system.
- 2. Download the Installer: Click the 'Free Download' button to securely download the latest version of WPS Office.
- 3. Install and Enjoy: Run the setup file to install the suite and start editing your PDFs and Office documents immediately.

Frequently Asked Questions
Why isn't my custom submenu appearing in Acrobat Pro DC?
This usually happens if there is a syntax error in your JavaScript file, or if the script was not placed in the correct trusted folder-level JavaScripts directory. You can press Ctrl+J (or Cmd+J on Mac) to open the Acrobat JavaScript console and check for execution errors.
Can I add a custom menu using document-level JavaScript?
While document-level scripts can execute certain actions upon opening a specific PDF, creating custom application-level menus typically requires folder-level scripts. This ensures the menus load properly when the application launches and operate with the necessary security privileges.
Is it possible to trigger a specific tool from a custom JavaScript submenu?
Yes, you can use the app.execMenuItem method within your custom menu item's execution script (the cExec parameter) to trigger native Acrobat tools or call other custom functions you have defined.




