Skip to main content
Participant
November 12, 2024
Answered

Open a PDF with javascript enabled (even if it is disabled in the registry)

  • November 12, 2024
  • 3 replies
  • 1464 views

On company computers Javascript execution in Acrobat is disabled by default (in registry bDisableJavaScript -Value '1') BUT... we have a custom application that needs to run certain PDF files allowing Javascript execution.
At the moment the user has to allow the javascript manually when opening the file, by clicking on the top bar.
Is there a way for the application to open the file passing the instruction not to block javascript ?

thank you!

This topic has been closed for replies.
Correct answer Bernd Alheit

Not possible.

3 replies

Thom Parker
Community Expert
Community Expert
November 12, 2024

There is a way to set a JavaScript requirement in the PDF so that Acrobat will warn the user about JavaScript in the document not running. 

The requirements are set with a script run from the console window. 

 

https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/doc.html#addrequirement

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
PDF Automation Station
Community Expert
Community Expert
November 12, 2024

If there were a script to allow JavaScript to run, it wouldn't run while JavaScript is disabled.

Bernd Alheit
Community Expert
Bernd AlheitCommunity ExpertCorrect answer
Community Expert
November 12, 2024

Not possible.