Skip to main content
Known Participant
January 29, 2022
Question

How can one use a JavaScript library in an Acrobat JavaScript script?

  • January 29, 2022
  • 2 replies
  • 535 views

I am writing an Acrobat Javascript script. It'd be convenient if it could require some JavaScript library. How can one use a JavaScript library in an Acrobat JavaScript script?

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
January 29, 2022

Any .js file you place in the application or user JavaScripts folder will be loaded at start-up, and all the functions in it will be available to all further scripts running within the application. Just be aware that it has to be in code JS-syntax, as most JS libraries were written for web-based applications, and that won't work if try to use them in Acrobat.

Bernd Alheit
Community Expert
Community Expert
January 29, 2022

You can define functions at application or document level and use the functions in your script.