Skip to main content
Known Participant
Jan 29, 2022 2:19 AM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

2 replies

try67
Community Expert
Community Expert
Jan 29, 2022 10:21 AM UTC

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.

Translate
Bernd Alheit
Community Expert
Community Expert
Jan 29, 2022 7:42 AM UTC

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

Translate