Copy link to clipboard
Copied
Hey i'm wondering if there is any way to load groupItem from .ai /.pdf file without opening it into Illustrator.
For example i know i can use:
app.preferences.PDFFileOptions.pageToOpen = 1;
groupItems.createFromFile(new File(pathToTheFile)); This will place 1st page of .pdf file as a group in my Document, but all the names, tags etc. inside this group will be destroyed, even text frames will be sliced.
I think the same will happen with:
app.activeDocument.placedItems.add(new File(pathToFile));
So is there any other way to get data from the .ai / .pdf file without running this?
app.open(new File(pathToFile));
I'm working on illustrator with lots of plugins and opening a file may last ~15-120 seconds, so i'm looking for some way to avoid it.
Copy link to clipboard
Copied
no, not that I'm aware of.
Copy link to clipboard
Copied
Thanks at least i know, that i have to live with what i have 🙂
Seems like i'll have to simplify it as much as i can, so those placed files will be still good to process, or i can stick to my previous idea with keeping the document open.
Copy link to clipboard
Copied
You make CEP panels, right? If you're trying to process multiple files you could have a CEP panel send an evalScript call to open some file, then using the documentAfterActivate event trigger your script on launch and have the document close itself afterward if needed, looping through a list of files for all of the above
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more