Copy link to clipboard
Copied
If there's a particular sequence of operations in Acrobat DC that I perform using menu options, is there a straightforward way to do the same thing in JavaScript?
In my case, I do this sequence a lot: "Prepare Form > More > Export Data > Save"
That's only four simple steps - is there way to do it in JS? Or is there some other route? Thanks. -Steve
Copy link to clipboard
Copied
No, but there's no need to. JavaScript can do it by itself, using the exportAsFDF command.
Copy link to clipboard
Copied
Unfortunately, also, these are not considered menu items. The only menu from which you can automate items is the menu along the top. Otherwise you need to look for specific functions to do what you want, which are rarely there.
Copy link to clipboard
Copied
You are probably better off figuring out the JavaScript functions for running your process, rather than doing it through "menu items". Especially since the one you've listed is not exactly a menu item.
However, to answer your question directly. Here's an article on how to run menu items with JavaScript.
https://acrobatusers.com/tutorials/executing_menu_items_from_javascript
In the early days, everything in Acrobat was a menu item. It's still mostly true, only the menu items are hidden. You'll find a (not free) plug-in here that exposes all the hidden menu items in acrobat.
And here you'll find an Acrobat JavaScript tool that displays the "Device Independent" menu item names, which you need to run a menu item from JavaScript.