Skip to main content
pbengtss
Participant
August 16, 2017
Answered

Script not working after update - Acrobat Reader DC

  • August 16, 2017
  • 2 replies
  • 2146 views

Acrobat Reader DC v2017.012.20095

Windows 10 v10.0.15063

I have a script "PrintFilename.js" in the following folder:

C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\Javascripts

The script adds a menu item and looks like this:

app.addMenuItem({cName:"Show Filename", cParent:"File", nPos:20, cExec:"AddFilename();"});

function AddFilename()

{

var re = /.*\/|\.pdf$/ig;

var MyFileName = this.path.replace(re,"");

for (var p = 0; p < this.numPages; p++)

{

var fd = this.addField("MyFilenameField", "text", p, [18,825, 500,840]);

fd.textSize=10;

fd.textColor = color.blue;

fd.value = MyFileName;

}

}

Last time I used it was on July 1st but now that I want to use the menu item I realise that it is no longer there. So something has happened after an update between July 1st and now. Either the script does not fire, or the code has stopped working.

Any ideas?

    This topic has been closed for replies.
    Correct answer try67

    Check the JS file is still there. Also, check that there isn't a new JavaScripts folder created for the new version.

    And check that the JavaScript preferences didn't change and especially that "Enable menu items JavaScript execution privileges" is ticked.

    2 replies

    Participant
    August 16, 2017

    We have similar problem after last update - about 8/8/2017. We did downgrade to Reader XI and all was OK. After last update of XI on version 11.00.21 we have the same problem (about 8/13/2017). Second reinstall to base version of Reader XI solved problem (except security problem :-)).

    • In some cases Reader totally crash.
    • We detected problems in Reader which is used inside Adobe LiveCycle Workspace (UI for process management)
    • JavaScripts are enabled.
    try67
    Community Expert
    try67Community ExpertCorrect answer
    Community Expert
    August 16, 2017

    Check the JS file is still there. Also, check that there isn't a new JavaScripts folder created for the new version.

    And check that the JavaScript preferences didn't change and especially that "Enable menu items JavaScript execution privileges" is ticked.

    pbengtss
    pbengtssAuthor
    Participant
    August 16, 2017

    Yes!

    "Enable menu items JavaScript execution privileges" had been unchecked! A million thanks!