• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can I perform a sequence of menu commands as JS?

New Here ,
Feb 21, 2019 Feb 21, 2019

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

TOPICS
Acrobat SDK and JavaScript , Windows

Views

240

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 21, 2019 Feb 21, 2019

Copy link to clipboard

Copied

No, but there's no need to. JavaScript can do it by itself, using the exportAsFDF command.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 21, 2019 Feb 21, 2019

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 21, 2019 Feb 21, 2019

Copy link to clipboard

Copied

LATEST

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.

Search Downloads

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.

Free Acrobat Automation Tools

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines