joshcallahan1
asked on
Acrobat batch sequence: Javascript editor pops up for each file in the Process directory.
Hi,
I've written a JavaScript batch sequence with acrobat 8 Pro.
Each Time I run a JavaScript contained in the sequence the JavaScript editor pops up and you must click "OK" then it processes the file. I'm dealing with hundreds of files at a time so clicking a button 100 times is just a waste of time.
Thanks for any assistance,
Josh
The Code Creates a field and puts the file name in the field here is the code:
I've written a JavaScript batch sequence with acrobat 8 Pro.
Each Time I run a JavaScript contained in the sequence the JavaScript editor pops up and you must click "OK" then it processes the file. I'm dealing with hundreds of files at a time so clicking a button 100 times is just a waste of time.
Thanks for any assistance,
Josh
The Code Creates a field and puts the file name in the field here is the code:
var inch = 72;
// Position a rectangle & assign attributes
var aRect = this.getPageBox( {nPage: 0} );
aRect[0] += .15*inch; // from upper left hand corner of page.
aRect[2] = aRect[0]+4*inch; // Make it 2 inch wide
aRect[1] -= .15*inch;
aRect[3] = aRect[1] -18; // and 24 points high
// Getting the name of the file
var strpath = this.path
var number_1 = strpath.lastIndexOf('/') + 1
var number_2 = strpath.lastIndexOf('.')
var myName = strpath.substring(number_1, number_2)
//Adding Field with
var f = this.addField(myName, "text", 0, aRect )
f.value = myName;
Go to Advanced -> Batch Processing -> Unselect 'Show the Run Sequence Confirmation dialog'
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a bunch You would have though they would have made that a little more obvious, this saves me some mouse clicks on a bunch of other sequences as well.