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

How to make a menu item a privileged function

Participant ,
Jul 20, 2020 Jul 20, 2020

Copy link to clipboard

Copied

app.addMenuItem({ cName: "A4", cParent: "Help", cExec: ttt});
app.beginPriv();
var ttt = "app.newDoc(420,595)";
app.endPriv();
TOPICS
How to , Windows

Views

678

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 , Jul 20, 2020 Jul 20, 2020

If you see an "X" in the right-most box of the "quick bar" under the method/property name, it means it's not accessible in Reader. For example:

try67_0-1595286657514.png

 

In addition, there are some properties that are Read/Write in Acrobat, but Read-Only in Reader. That will appear in the property's description. For example:

try67_1-1595286739403.png

 

Votes

Translate

Translate
Community Expert ,
Jul 20, 2020 Jul 20, 2020

Copy link to clipboard

Copied

One sample:

 

trustedNewDoc = app.trustedFunction( function (nWidth, nHeight)
{
// Additional code may appear above
app.beginPriv(); // Explicitly raise privilege
app.newDoc( nWidth, nHeight );
app.endPriv();
// Additional code may appear below.
})

info: newDoc will not work in Acrobat Reader.

 

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
Participant ,
Jul 20, 2020 Jul 20, 2020

Copy link to clipboard

Copied

Thanks for the help! Where can I see a list of functions that will not work in Acrobat Reader?

Is there any other way to use code in Acrobat Reader?

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 ,
Jul 20, 2020 Jul 20, 2020

Copy link to clipboard

Copied

Look at the methods in the Acrobat Javascript reference.

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
Participant ,
Jul 20, 2020 Jul 20, 2020

Copy link to clipboard

Copied

I have "Developing Acrobat® Applications Using JavaScriptâ„¢" and "JavaScriptâ„¢ for Acrobat® API Reference", but it all works for Acrobat DC and only partially for Acrobat Reader DC!

Where can you see what 100% works for Acrobat Reader? of course I mean javascript

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 ,
Jul 20, 2020 Jul 20, 2020

Copy link to clipboard

Copied

If you see an "X" in the right-most box of the "quick bar" under the method/property name, it means it's not accessible in Reader. For example:

try67_0-1595286657514.png

 

In addition, there are some properties that are Read/Write in Acrobat, but Read-Only in Reader. That will appear in the property's description. For example:

try67_1-1595286739403.png

 

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
Participant ,
Jul 21, 2020 Jul 21, 2020

Copy link to clipboard

Copied

LATEST

Many thanks!

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 ,
Jul 20, 2020 Jul 20, 2020

Copy link to clipboard

Copied

Especially, consult the "quick bar", a grid at the start of the description of each method. Bear in mind programming of Reader is very limited. Programming is one of the marketing tools for Acrobat: Adobe really want to sell copies of Acrobat to every end user, not just the programmers.

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