Automatically click a button in pdf file with Acro-js
Copy link to clipboard
Copied
I know these procedures exist in Javascript, but I did not find them in Acro-js. I cannot use methods other than Javascript. How can I do it?
Copy link to clipboard
Copied
It's not possible to "emulate" clicking a button using Acro JS. However, if the action associated with the button is to execute a script, you can place that code in a function at the doc-level and then just call it directly.
Copy link to clipboard
Copied
What actions does you use at the button?
Copy link to clipboard
Copied
If the button does not run JavaScript, but runs some other Action instead, then a bookmark can be used as a proxy. There is no functionality in Acrobat JavaScript for forcing a button click, but there is for a bookmark click. Put the button action on a bookmark, then add JavaScript code to the Page Open script to run the bookmark after a delay.
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Thank you to all of you. I tried to place the action in a function as suggested and it worked.

