Copy link to clipboard
Copied
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:
Regards,
Dirk
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
Copy link to clipboard
Copied
Hi Dirk,
app.PDFPlacePreferences.pageNumber
Does that not work?
Ariel
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
what loic said, use pageToOpen, here's a link to a working script
How to "Place as linked file" (not "import") a multipage PDF file on a single Artboard ?
Copy link to clipboard
Copied
If I can help the great Dirk Becker​ once in my lifetime, I will be happy to pay back a little for all the generous help he provided to me over the years
Copy link to clipboard
Copied
Thanks all, I'll give it a try. PDFFileOptions plus an action.
Here comes the next problem - the placed file name will be hard-wired in the action.
Solvable with a following relink(), the page number is preserved.
Hmm.
Now I also retried the previous approach - et voilà , placedItems.add().file will honour the setting, no need for an action!
Sorry Carlos, I had set the "Correct" flag too early because going thru an action sounded too compelling Illustrator-ish.
Thanks a lot, Loic.
I see I'll have still much to learn with Illustrator.
Copy link to clipboard
Copied
So all you have to do is set the preference and do placed item add? Maybe I have done this before, but my memory is very distant if any on that one time.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now