Copy link to clipboard
Copied
Sometimes I receive interactive PDFs that I need to translate. Some buttons have actions that display alerts in a pop-up window when clicked. It can be time-consuming to check all the buttons to see if any of them have those alerts.
I'm looking for a script to export those alerts to a .txt file, and then import it back once the alert text is translated. Is it possible?
PS. I know it is possible to get all code using: Tools > JavaScript > All JavaScript. I just wanted an automated way to export and import it back.
Thank you.
Copy link to clipboard
Copied
Unfortunately a script cannot access other scripts in the PDF. This type of thing would need to be done with a plug-in.
Copy link to clipboard
Copied
I know it is possible to get all code using: Tools > JavaScript > All JavaScript. I just wanted an automated way to export and import it back.
Copy-paste the "All JavaScript" text in a text editor.
Use the search feature to find all text strings inside quotes and edit them.
Copy-paste back the new text in "All JavaScript".