PDF Security & Access Issues

Fix Adobe Acrobat JavaScript Warnings for Custom Menus

Emma BrownEmma Brown Nov 25, 2026 868 views

Question details

The user needs to resolve Acrobat JavaScript security warnings when custom menus and dialogs call a function named myTrustedFunction.

Fix Adobe Acrobat JavaScript Warnings for Custom Menus
Product
Adobe Acrobat JavaScript
Device & OS
not provided
Scenario
Custom JavaScript files create Acrobat menus and dialogs that call a function intended to run privileged operations.
Observed behavior
Calling a function named myTrustedFunction does not eliminate the security warnings.
Before you start

Identify the exact API call that triggers the warning and check its security restrictions in the Acrobat JavaScript API reference. In Acrobat Preferences > JavaScript, confirm that Acrobat JavaScript is enabled.

Solution 1Recommended

Implement an Acrobat trusted function for privileged calls

Use Acrobat’s trusted-function security model when a menu or dialog needs to call an API that permits privileged execution.

Naming a function myTrustedFunction does not make it trusted. Define it with app.trustedFunction in an appropriate privileged location, and use app.beginPriv and app.endPriv around the permitted privileged operation.

A trusted function does not bypass every Acrobat security restriction. Check the documentation for the specific API and execution context.

1
Find the restricted call

Open the custom JavaScript file and identify the method that produces the warning. Look up that method in the Acrobat JavaScript API reference to check whether it can run in a privileged context.

2
Define the trusted function

In an appropriate folder-level Acrobat JavaScript file, define the function using app.trustedFunction. Inside it, call app.beginPriv(), run the permitted privileged operation, and call app.endPriv() in a finally block.

3
Call and test the function

Update the custom menu or dialog callback to call the trusted function. Restart Acrobat to load the folder-level script, then select the custom menu item and check whether the warning persists.

Implement an Acrobat trusted function for privileged calls
Check the execution context: Use the Acrobat JavaScript documentation to confirm where the trusted function must be defined and which operations it may perform. Defining it in an untrusted document script may not provide the required privileges.
Free Microsoft Office alternative

Work with PDFs and Office documents in WPS Office

WPS Office is a free, lightweight alternative for everyday document and PDF work. Its familiar interface and Microsoft Office format compatibility make it easy to move existing files into your workflow. It does not fix Acrobat JavaScript security warnings or replace Acrobat’s trusted-function model.

Open and work with PDF documents alongside other office filesCompatible with Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXUse a familiar interface for everyday document tasksMove existing Office files into a lightweight, free office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does naming a function myTrustedFunction not remove the warning?

Acrobat does not grant privileges based on a function name. Define the function with app.trustedFunction in an appropriate privileged location and follow the security requirements for the API it calls.

Where should I put an Acrobat trusted function?

Define it in an appropriate privileged location, such as a folder-level Acrobat JavaScript file, rather than assuming a document script is trusted. Consult the Acrobat JavaScript API documentation for the applicable installation location and restart Acrobat after adding the script.

Does a trusted function allow every restricted Acrobat operation?

No. A trusted function can provide a privileged context for operations that permit it, but other security restrictions may still apply. Check the API reference for the specific method and calling context.

Why is my custom menu missing in the new Acrobat interface?

Custom menu behavior can differ in newer Acrobat interfaces. If available, select Disable new Acrobat from the application or View menu, restart Acrobat, and test the menu in the classic interface.