1 Reply Latest reply on Aug 5, 2016 7:17 AM by williamadowling

    Get the Place PDF dialog to select different page for linked file


      Hi all,


      I have a multipage PDF that is linked in AI. I've imported Page 1, and I used Transform to achieve a Step and Repeat pattern.

      After expanding and ungrouping I have a let's say 10 x 10 grid of that first page.

      I need to go through each of these 100 positions and relink to a different (random) page from that same initially linked PDF.

      What i'd like is a script upon which execution I'd get the Place PDF dialog, using the same already linked file, and skipping the Relink dialog.


      So far I've automated this via an action, but I have to rerecord it each time for different incoming PDF file.


      The functionality I need is exactly the same as this line of code:

      1. var g; (g=app.selection[0].graphics[0]). 
      2.     place(g.itemLink.filePath, true); 

      which does the trick for InDesign. Of course, the AI JS syntax is different


      I'm very new to scripting and I'd appreciate any help.


      Thanks in advance!