Skip to main content
Legend
January 25, 2018
Answered

Get and set artboard of placed item

  • January 25, 2018
  • 1 reply
  • 899 views

Hi all,

when I manually place an AI/PDF file, the PDF import options dialog allows to specify a page or artboard of the imported file. Is there a way to do the same by script, and/or later on retrieve the value?

I've already tried:

  • matching properties of placedItem
  • parameters for relink()
  • PDF import options
  • tags

Regards,

Dirk

Correct answer Loic.Aigon

Oops -- didn't notice which forum we were in!

Sorry, then, I have no idea! Hopefully someone else will chip in here and share their expertise.

Ariel


Hello,

Nothing straightforward as it seems :\ Only things I could think of is:

a) open the file aside, set active artboard, duplicate items to new Document (if possible)

b) Open doc with PDFFileOptions/pageToOpen

saves a tempFile

either use createFromFile (tempFile) or placedItems.add().file = …

Hoping there is a better way,

FWIW

Loic

1 reply

TᴀW
Legend
January 25, 2018

Hi Dirk,

app.PDFPlacePreferences.pageNumber

Does that not work?

Ariel

id-extras.com | InDesign tools & scripts for typesetters, form designers, and translators
Legend
January 25, 2018

Hi Ariel,

if this were InDesign, sure.

I'm looking for the equivalent in Illustrator, drawing icons with InDesign feels a little odd ...

Thanks,

Dirk

TᴀW
Legend
January 25, 2018

Oops -- didn't notice which forum we were in!

Sorry, then, I have no idea! Hopefully someone else will chip in here and share their expertise.

Ariel

id-extras.com | InDesign tools & scripts for typesetters, form designers, and translators