Injecting document script in batch using Action sequence
I have a bunch of PDF that I need to add a long document javascript in them. I want to use an action to inject it to a bucnh of PDF.
I have found this steps on StackOverflow (provided Joel Geraci):
- - - - -
- Create a new Action
- Select "More Tools"
- Select "Execute JavaScript"
- The script your action runs will need to inject the JavaScript that you want the PDF to run as a string. You'll need to give it a name ("init" in this case) so it appears in the "Document JavaScripts" list. So it will look like this...
this.addScript("init", "app.alert('Hello World');")
- - - - -
Works perfectly on a small code to inject. But I can't figure out how to us ethe same steps to includes a long multiline javascript. I have try a few things like defining a variable but it keep failing.
How can I write a long multiline code to be injected using the: this.addScript("init", "[code here]")

