Skip to main content
Participant
June 29, 2026
Answered

resolve javascript issue with Adobe Acrobat DC version 2025.001.20918

  • June 29, 2026
  • 7 replies
  • 59 views

I recently installed Adobe Acrobat Pro DC version 2025.001.20918.

Previously, I had Adobe Acrobat Pro DC version 2024.005.20399 and I had a Javascript file in directory 

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

which was an option under the “Edit” menu with my old version (using the older user interface rather than the default new interface). I can not find where to select this javascript with the new version.  I have not figured any setting in the new version to enable use.  Please advise.

    Correct answer Anand Sri Bhattacharya

    @BruceG4266840, thanks for the screenshots. They pinpoint it, and you are right that you do not need the debugger.

    PageLabel.js is a folder-level script, not a document script. Acrobat loads it automatically at startup, and it adds its command for you to use. You never select it from inside Acrobat. The JavaScript tool you have open only manages scripts embedded inside the open PDF, so it will never list a folder-level file like PageLabel.js. That tool not finding it is expected, not the bug.

    The real cause is the folder. Your screenshot shows the file in:
    C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\Javascripts
    That is the 32-bit path from your old version. The current Acrobat is 64-bit and loads scripts from a folder under Program Files without the "(x86)". The upgrade did not move the file, so the new version never loads it.

     

    • Open any PDF, press Ctrl+J, type the line below, and run it with Ctrl+Enter to get the exact folder your install uses (likely C:\Program Files\Adobe\Acrobat DC\Acrobat\Javascripts):
      app.getPath("app", "javascript");
    • Fully close Acrobat, then copy PageLabel.js into that folder (Program Files needs admin rights). No admin rights? Run app.getPath("user", "javascript"); instead and use that per-user folder.
    • Check Menu > Preferences > JavaScript and confirm Enable Acrobat JavaScript is on.
    • Restart Acrobat.

    Let us know how it goes.

    Regards,

    Anand Sri.

    7 replies

    Participant
    June 29, 2026

    Moving the file from directory/folder

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

    to directory/folder

    C:\Program Files\Adobe\Acrobat DC\Acrobat\Javascripts\

    resolved my problem.  BTW, verifying whether the file needed to be in a different directory/folder was my initial web search (to which I did not find the answer).

    Much appreciated.

     

    Anand Sri Bhattacharya
    Community Manager
    Community Manager
    June 29, 2026

    @BruceG4266840 Glad to know that it worked. Please feel free to reach out if you need any assistance.

     

    Regards,

    Anand Sri

    JR Boulay
    Community Expert
    Community Expert
    June 29, 2026

    To ensure this script works and displays correctly in both the new and old interfaces, delete the lines I have crossed out in red and replace them with:

    // MODIFICATION FOR NEW INTERFACE ON WINDOWS
    if (/AV2::HamburgerMenu/.test(app.listMenuItems())) {var papaMenu = "AV2::HamburgerMenu";}
    else {var papaMenu = "Edit";}
    app.addMenuItem({cName: "Add Page Labels", cParent: papaMenu, cEnable: "event.rc = event.target != null", cExec: "addPageLabels(this)"});
    app.addMenuItem({cName: "Remove Page Labels", cParent: papaMenu, cEnable: "event.rc = event.target != null", cExec: "removePageLAbels(this)"});

     

    Acrobate du PDF, InDesigner et Photoshopographe
    Participant
    June 29, 2026

    This is how it used to look (on my prior version):

    The contents of the PageLabel.js file starts with:

     

    Anand Sri Bhattacharya
    Community Manager
    Community Manager
    June 29, 2026

    @BruceG4266840, thanks for the screenshots. They pinpoint it, and you are right that you do not need the debugger.

    PageLabel.js is a folder-level script, not a document script. Acrobat loads it automatically at startup, and it adds its command for you to use. You never select it from inside Acrobat. The JavaScript tool you have open only manages scripts embedded inside the open PDF, so it will never list a folder-level file like PageLabel.js. That tool not finding it is expected, not the bug.

    The real cause is the folder. Your screenshot shows the file in:
    C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\Javascripts
    That is the 32-bit path from your old version. The current Acrobat is 64-bit and loads scripts from a folder under Program Files without the "(x86)". The upgrade did not move the file, so the new version never loads it.

     

    • Open any PDF, press Ctrl+J, type the line below, and run it with Ctrl+Enter to get the exact folder your install uses (likely C:\Program Files\Adobe\Acrobat DC\Acrobat\Javascripts):
      app.getPath("app", "javascript");
    • Fully close Acrobat, then copy PageLabel.js into that folder (Program Files needs admin rights). No admin rights? Run app.getPath("user", "javascript"); instead and use that per-user folder.
    • Check Menu > Preferences > JavaScript and confirm Enable Acrobat JavaScript is on.
    • Restart Acrobat.

    Let us know how it goes.

    Regards,

    Anand Sri.

    Participant
    June 29, 2026

    I am not creating or editing a Javascript file.  Therefore, I assume I do not require the Javascript debugger.  I have a Javascript file that used to work with my prior version Adobe Acrobat Pro DC.

    With the “JavaScript” tool open, I do not see a way to select this file:

    The “JavaScript” tool appears to be used for creating and editing a Javascript file.

    This tool does not even find my file.

     

    Anand Sri Bhattacharya
    Community Manager
    Community Manager
    June 29, 2026

    @BruceG4266840, thanks for the screenshots. They pinpoint it, and you are right that you do not need the debugger.

    PageLabel.js is a folder-level script, not a document script. Acrobat loads it automatically at startup, and it adds its command for you to use. You never select it from inside Acrobat. The JavaScript tool you have open only manages scripts embedded inside the open PDF, so it will never list a folder-level file like PageLabel.js. That tool not finding it is expected, not the bug.

    The real cause is the folder. Your screenshot shows the file in:
    C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\Javascripts
    That is the 32-bit path from your old version. The current Acrobat is 64-bit and loads scripts from a folder under Program Files without the "(x86)". The upgrade did not move the file, so the new version never loads it.

     

    • Open any PDF, press Ctrl+J, type the line below, and run it with Ctrl+Enter to get the exact folder your install uses (likely C:\Program Files\Adobe\Acrobat DC\Acrobat\Javascripts):
      app.getPath("app", "javascript");
    • Fully close Acrobat, then copy PageLabel.js into that folder (Program Files needs admin rights). No admin rights? Run app.getPath("user", "javascript"); instead and use that per-user folder.
    • Check Menu > Preferences > JavaScript and confirm Enable Acrobat JavaScript is on.
    • Restart Acrobat.

    Let us know how it goes.

    Regards,

    Anand Sri.

    Anand Sri Bhattacharya
    Community Manager
    Community Manager
    June 29, 2026

    Hello ​@BruceG4266840 

     

    I hope you are doing well, and sorry for the trouble you had. 

     

    The version details you shared are for a very old version. The current build of Acrobat Pro DC is: 26.001.21691, Planned update, Jun 25, 2026. Can you please share a screenshot of the UI window you are using for more clarification?

     

    You can also access the JavaScript from the All-Tools section. 

     

    You can also add the shortcut of JavaScript in the floating toolbar: 

     

    Ensure that JavaScript is enabled from Menu > Preferences > JavaScript >> enable the debugger >> restart.

     

    Let us know how it goes, and share your findings.

    Regards,

    Anand Sri.

    Participant
    June 29, 2026

    Also not an option under the “File” menu.

    Bernd Alheit
    Community Expert
    Community Expert
    June 29, 2026

    Try the “File" menu.