Page 1 of 1

Re: Acrobat script // Need help

Posted: Fri Mar 27, 2015 9:41 am
by bens
Some details depend on how you are trying to use this script. I will assume it's used in one of the properties of the Acrobat element in a Switch flow.

First, get rid of the "<script type="text/javascript">" and "<script>" tags. Those are html tags, but Switch and Acrobat use JavaScript directly - no html.

As you noted, "this" is incorrect. You want it to be the document, provided by Switch. Replace every instance of "this." with "$doc."

The script will show an alert window if something goes wrong. In an automated environment this is usually not what you want, since the application will block until the user clicks the alert. Instead, you want to signal the error back to Switch. Change "app.alert(e);" to "$error = e.description"

More information can be found in the Switch help under "JavaScript for applications".

Re: Acrobat script // Need help

Posted: Fri Mar 27, 2015 10:50 am
by bens
Unfortunately you cannot test Adobe scripts in SwitchScripter. You'll have to create a simple flow in Switch and test it there.

Re: Acrobat script // Need help

Posted: Fri Mar 27, 2015 3:11 pm
by gabrielp
All Systems Integration provided us a script to do exactly this. We had to break apart the PDF, dupe the pages, then merge the PDF back together. If that sounds like it would work for you, maybe just send them an email asking for it?

Re: Acrobat script // Need help

Posted: Mon Mar 30, 2015 10:40 pm
by andrea mahoney
Hi,
Your script should be installed in the Command Section of the Acrobat Configurator, not the Save Section. Use the save section to save the pdf and close Acrobat.