Adobe Acrobat scripting

Hello,

we (OS X 10.3, Acrobat 6) have a folderaction that opens all the PDF files one by one and prints them with special settings. One problem we have is that we only can set the special settings with the UI elements extension which is very slow. Is there an alternative? The only settings which can be changed directly in Acrobat with Applescript seems to be the zoom factor. It would be nice to change to a special saved setting before printing. Changing the printer in the printing dialog is another problem. Are there comand line options for Acrobat? I did not find anything. I would be nice to give Acrobat the names and settings through a comand line.

But the main problem is: When we print big files and the G5 needs a lot of time doing it the script will not wait before the file is totally printed but tries to open the next file. Which fails and the script stops working. Is there a solution to poll the state of Acrobat before the script goes to the next file?

Another solution would be to work with 2 folders. One for the waiting and one for the job to be printed. The script should move the next PDF file to the printing folder when it is empty (the PDF can be deleted when printed). Is that possible with a folder action?

Thank you for any help on this subject!

I’ve done something like suggested in your final solution. It works pretty good. There’s a folder action for when items are removed from the folder.

removing folder items from‚v : Called after items have been removed from a folder
removing folder items from alias : the folder losing the items
after losing list of alias : a list of the items the folder lost. For permanently deleted items, only the names (in strings) are provided.

I tried that now and it works as it should but the problem is still there. The script which prints the PDF file should close the window when finished and delete the file. But when printing takes too long (showing the “Printing…” dialog) the script stops working. It will not do anything when the printing is finished. A higher timeout doesn’t do anything either.

So it makes no difference if there is one or more files in the hotfolder, if it takes too long the script will not be executed to the end.

If you have done something like batch printing with Acrobat and Applescript which is able to select settings in the printing dialog it would be cool if you could show me the script. All I tried did not work…

Thanks!

I’m sorry, but I’ve never scripted with Acrobat before. I just had a problem of one script starting before another finished. So, I fixed in the way described. But if your script thinks it’s “done” when it technically isn’t is a little more tricky problem. You could try putting in some kind of delays. Sorry I can’t be of more help.