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

JSObject Batch process

igkins
Registered: Feb 27 2007
Posts: 6

I'm trying to run a batch process programatically that converts pdfs to text using IAC and JSObject, but I cannot figure out what call i make to the JSObject that will fire the batch process, "export to rtf", or how do i create my own custom process the JSObject can fire.

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You can't run a batch process from the IAC or JavaScript. This can only be done manually through the user interface.

Thom Parker
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]

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

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

igkins
Registered: Feb 27 2007
Posts: 6
Hmm, in a previous question you had mentioned that this could be done:

#2. Use VB and the Acrobat IAC API (and the JSO) to write your own batch process.

for someone doing something similar to what I'm trying to accomplish, can you clarify more about what you meant?

So far, I've explored having VB loop over an arry of my PDF names and fire the JSObject's saveAs command and sending the type as ...acrobat.plain-text, but if acrobat reaches a font it doesn't understand, the whole process hangs with a warning box until I click ok. The batch process included with acrobat seems to ignore these messages, but then I guess I can't run this from code. I want to run this from my workstation at night, so I'm not going to be around to click the "OK" button...
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Ahh, this is a different thing, an unfortunate collision of terms. The point of my previous answer was the same thing. You can't run a batch from IAC or JavaScript. If you want to do it you have to create an alternative means. Which it looks like you have already done.

Have you explored other tools for this conversion? You are trying to use Acrobat in a way in which is was not really intended to be used. It might be better to just look for a different way. For example. There are Windows automation tools that execute sequences of keystroks and mouse clicks. It's possible you could use a tool like this to run a real Batch Sequence.

Thom Parker
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]

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

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

igkins
Registered: Feb 27 2007
Posts: 6
I asked an acrobat developer who worked on 7, and he made this cryptic comment:

It can be done in a tricky way through Application open Javascripts, which lie in C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Javascripts folder.

Does this make any sense to you or provide an alternative for accomplishing the goal?