• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Communicating between Acrobat XI and InDesign CS6

Explorer ,
Apr 11, 2013 Apr 11, 2013

Copy link to clipboard

Copied

I am submitting this question to both the InDesign Scripting forum and the

Acrobat Javascripts forum at the same time.

I built an Acrobat Javascript program to read through text in PDFs and extract

all URLs and email addresses.  I place that information in a PDF file and save

it.

Now I need to get at that information in InDesign so that I can use it to modify

InDesign documents with overlays.

I have looked at the documentation for both Acrobat and InDesign Javascript.  In

the InDesign documentation there is plenty of indication that information can be

passed between Adobe applications if the appropriate "infrastructure" is set up.

However no mention is made of Acrobat in that documentation and if I turn to the

documentation for Acrobat, there is not word one that I have found on passing

information from Acrobat to another Adobe application.

Has any scripter in either forum ever had the requirement to pass data between

Acrobat and InDesign, and if they did, would they mind indicating what I should

be looking at to do the same in my Javascripts?

TIA!

John

TOPICS
Scripting

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 11, 2013 Apr 11, 2013

Copy link to clipboard

Copied

@John – you could write that information to a text file.
An InDesign script could pick that up.

Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 12, 2013 Apr 12, 2013

Copy link to clipboard

Copied

Uwe:

   InDesign has a File object that may be used for file I/O, but I cannot find an equivalent in Acrobat.  As Javascript has no native file I/O support, how would one go about writing that text file?

R,

John

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2013 Apr 12, 2013

Copy link to clipboard

Copied

@John – can you use the export functions of Acrobat Pro?


In Acrobat Pro v9.x:

File / Export / Text / Text(Plain)


Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 12, 2013 Apr 12, 2013

Copy link to clipboard

Copied

Alas, this needs to be automated. The script must do it. But the very fact that it can be done manually leads me to believe that there must be a way with JS.

R,

John

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 11, 2013 Apr 11, 2013

Copy link to clipboard

Copied

Good morning,

for example Kasyan provided a example to access acrobat by bridgetalk -> His case: ID to Acrobat.

http://kasyan.ho.com.ua/indesign_acrobat.html

I did a short test on PC and Mac, but the example doesn't work for me as acrobat doesn't seem to be accessable by bridgetalk on both machines. (5.5 - X)

A quick googlerequest shows a few equal results.

So you've got to test under which circumstandes it'll works. Working on Mac would provide the ability to use AS.

Hans-Gerd Claßen

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Apr 13, 2013 Apr 13, 2013

Copy link to clipboard

Copied

LATEST

Hi all,

The trick with BridgeTalk worked for me only in InDesign 5.0.3, Acrobat 8.0.0, Windows XP SP3. In all other versions (and on Mac) Acrobat is unavailable. (You can get the list of available applications by running  BridgeTalk.getTargets() in ESTK). Here is a long discussion on the subject.

In my practice I often mix different scripting languages: JS, AS and VB.

If you're on Mac, you can run your acrobat js like so:

tell application Acrobat

    set myScript to "app.alert('Hey!');"

    do script myScript

end tell

(I am on PC at the moment and typing this from memory)

I never use a temporary text file for storing/passing data (say, from InDesign to another application). I simply pass them directly as variables:

1.jpg

If you're on Windows,  you can use JSObject — a mechanism that allows external clients to access the same JavaScript functionality provided by Acrobat from environments such as Visual Basic. (Long ago I experimented with it and it worked for me). More information is in the Programming Acrobat JavaScript Using Visual Basic.

Hope this helps.

Regards,
Kas

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines