PDF Security & Access Issues

How to Fix NotAllowedError and Make HTTP Requests in Acrobat PDF

Bushra ParveenBushra Parveen Nov 5, 2026 868 views

Question details

The user needs to successfully execute a network HTTP request from a PDF button action without triggering Acrobat's security restrictions.

How to Fix NotAllowedError and Make HTTP Requests in Acrobat PDF
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Attempting to use the Net.HTTP.request method directly within a PDF button's JavaScript action to communicate with an external server.
Observed behavior
Acrobat blocks the network request and displays a NotAllowedError, as security settings prevent privileged code from running directly from a button action.
Before you start

Ensure you have administrative access to your computer, as creating folder-level JavaScript files in Adobe Acrobat requires write permissions to the application's installation or user data directories.

Solution 1Recommended

Create a Trusted Folder-Level JavaScript Function

Bypass the NotAllowedError by wrapping your network request inside a trusted function stored at the application level, and then call it from your PDF button.

Because of Adobe Acrobat's strict security sandbox, running Net.HTTP.request directly from a document-level or button-level script is restricted.

To execute privileged operations safely, you must declare a trusted function inside a .js file located in Acrobat's JavaScripts folder. Your PDF button can then securely call this trusted function to make the HTTP request.

1
Locate the JavaScripts directory

Navigate to the Acrobat JavaScripts folder. On Windows, this is typically located at 'C:\Program Files\Adobe\Acrobat DC\Acrobat\Javascripts' or within your AppData roaming profile.

2
Create a new JavaScript file

Create a new plain text file in this directory and name it 'http_request.js'. You may need administrator privileges to save files in this location.

3
Define the trusted function

Open the .js file in a text editor and define your function using app.trustedFunction. Use app.beginPriv() and app.endPriv() inside the function to elevate privileges before calling Net.HTTP.request.

4
Update the PDF button action

Open your PDF document in Acrobat, right-click the button, and select 'Properties'. Under the 'Actions' tab, edit the 'Run a JavaScript' action to call your new trusted function instead of directly making the HTTP request.

5
Restart Adobe Acrobat

Close and reopen Adobe Acrobat so the application loads the new folder-level JavaScript file upon startup.

Create a Trusted Folder-Level JavaScript Function
Deployment Requirement: If you distribute this PDF to other users, they must also have the identical folder-level .js file installed on their local machines, or the HTTP request will fail.
Free Microsoft Office alternative

Looking for a Lightweight PDF and Office Suite?

If complex script restrictions and enterprise software configurations are slowing you down, try WPS Office. It provides robust PDF editing capabilities alongside a complete suite for documents, spreadsheets, and presentations—all in one lightweight package.

  1. 1. Download the installer: Visit the official WPS Office website and click the free download button.
  2. 2. Install the software: Run the downloaded executable file and follow the on-screen prompts to complete the installation.
  3. 3. Manage PDFs easily: Open WPS Office and set it as your default PDF viewer to start editing and annotating documents immediately.
Fully compatible with Microsoft Word, Excel, PowerPoint, and standard PDF formats.Comprehensive PDF tools to view, edit, annotate, fill forms, and manage pages effortlessly.Lightweight installation with a familiar, user-friendly interface.Cost-effective solution that simplifies document management without steep learning curves.
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get a NotAllowedError in Acrobat when running JavaScript?

Acrobat runs document scripts in a secure sandbox to protect users from malicious code. Actions that interact with the system or network, such as HTTP requests, are heavily restricted unless executed through a trusted, folder-level JavaScript file.

Where do I put folder-level JavaScript files in Acrobat?

Folder-level scripts are typically placed in the application's JavaScript directory. For Windows users, this is commonly found at C:\Program Files\Adobe\Acrobat DC\Acrobat\Javascripts. Mac users will find it inside the Adobe Acrobat application package.

Will my trusted HTTP request function work if I share the PDF with others?

No. Trusted folder-level scripts reside locally on the host machine. If you share the PDF, the recipient must also install the exact .js file in their own Acrobat JavaScripts directory for the button to function correctly.

Can I disable JavaScript security in Acrobat completely to avoid this error?

While you can disable global JavaScript or manage privileged locations in Acrobat's Trust Manager settings, bypassing security altogether is highly discouraged due to significant malware risks. Relying on trusted functions is the safest, Adobe-supported approach.