These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

How to tell MAC OS that Acrobat has finished processing a file

rgreenidge
Registered: Oct 31 2006
Posts: 2

We are running a job that uses both Apple Script and JavaScript within Acrobat to process PDF's. Basically AppleScript tranfers multiple files to folder that has an AppleScript attached to it. The AppleScript then launches Acrobat and runs a JavaScript within Acrobat. The problem is that AppleScript continues to open documents before the intitial document has finished processing. Is there a way to have Acrobat hold the other PDF's until it has finished processing the currently open document and then proceed to the next PDF in line.

Thanks,
Richard.

Platform: Macintosh
Version: Acrobat 8

My Product Information:
Acrobat Pro 8.1.2, Macintosh
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You'll need to setup some kind of polling process where the Applescript tests a value in Acrobat that can be set with JavaScript. Use AppleScript to set this value before starting the JS, then the JS will need to reset it when it's finished. However, not everything JS does is a blocking operation, and it's not multithreaded either. I've had lots of timing problem because of these very problems. To get around them I've had to at times create some kind of delay mechanism. You'll probably need both.

One idea, if it's possible for your process, is to have JS close the PDF after processing. Then the AppleScript tests for the file being open.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script