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

addMenuItem from 8 Pro to 11 Pro

Explorer ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

I have the following trusted save function that I use all the time for Adobe Acrobat 8 Pro on my Windows 7 64 bit PC....

app.addMenuItem( {

cName: "trustedSave",

cUser: "Save SIS File", cParent: "Tools",

cExec: "saveSisFile();", nPos: 0

} );

app.addMenuItem( {

cName: "trustedSave",

cUser: "Save PUB File", cParent: "Tools",

cExec: "savePubFile();", nPos: 0

} );

I am trying to use this same code in Adobe Acrobat XI Pro that my company just upgraded me to.

Can someone direct me to the folder location my trusted save and functions should be put in?

Also is my app.addMenuItem written correctly?

Any help would be appreciated!

TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.1K

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

correct answers 1 Correct answer

Community Expert , Apr 06, 2017 Apr 06, 2017

Acrobat XI doesn't have a Tools menu, so it can't work. Either use

something else, like Edit or File, or switch to the addToolButton method,

if you want it to appear under the Tools panel on the right.

Votes

Translate

Translate
Community Expert ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

Acrobat XI doesn't have a Tools menu, so it can't work. Either use

something else, like Edit or File, or switch to the addToolButton method,

if you want it to appear under the Tools panel on the right.

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
Explorer ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

That makes sense....

Can you tell me where the javascript files should be moved to since the layout is different?

I had them stored here for 8.....

C:\Users\YOUR_USER_NAME\AppData\Roaming\Adobe\Acrobat\8.0\JavaScripts

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 ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

On Windows, the JavaScripts directory should be this (please note that there is a "Privileged" folder in the path, which is different from what you had with Acrobat 8):

C:\Users\YOUR_USER_NAME\AppData\Roaming\Adobe\Acrobat\Privileged\11.0\JavaScripts

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 ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

If any directory level does not exist, then you need to create that directory and the following directories.

The users app directory is hidden by default. You can either unhide the directory or use the system variable %appdata% to quickly navigate to the folder using Windows File Explorer.

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 ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

You can also use:

C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Javascripts\

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 ,
Apr 07, 2017 Apr 07, 2017

Copy link to clipboard

Copied

Hi.

is my app.addMenuItem written correctly?

You can use this script that uses Acrobat's menus regarding its version:

if (app.formsVersion >= 10) {var myMenu = "Edit";}

else {var myMenu = "Tools";}

app.addMenuItem( {

cName: "trustedSave",

cUser: "Save PUB File", cParent: myMenu,

cExec: "savePubFile();", nPos: 0

} );

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 ,
Apr 07, 2017 Apr 07, 2017

Copy link to clipboard

Copied

LATEST

Looks fine, yes.

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 ,
Apr 07, 2017 Apr 07, 2017

Copy link to clipboard

Copied

Can someone direct me to the folder location my trusted save and functions should be put in?

You should use this free tool: https://www.abracadabrapdf.net/utilities-in-english/pdf-utilities/show_me_the_path-en/

.

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