Copy link to clipboard
Copied
Hi,
My goal is to insert all the pages from an illustrator file (javascript) into an Indesign document and get a handle on them (so I can spread them on different pages, etc). That needs to happen without user intervention.
I am looking at the API documentation was trying use the place() method from Page, but that one only places the first page it seems (i.e. the Array returned has size 1). I noticed the actual Indesign client prompts you to insert every AI page.
So, I repeat the question, how do I get (in javascript) a handle on all the pages from the illustrator file?
thank you!
Cristian
Hi,
There is a app.pdfPlacePreferences to set before calling a place method. I mean;
To place 3rd page of mFile into selected graphic frame use:
app.pdfPlacePreferences.pageNumber = 3;
app.selection[0].place(mFile);
Above should work for PDF and AI files.
For INDD file set app.importedPageAttributes.pageNumber property.
Jarek
Copy link to clipboard
Copied
It seems the way to handle it is inserting the pages one by one, controlling it with app.pdfPlacePreferences.pageNumber. I am about to test soon ...
Copy link to clipboard
Copied
You have saved your files in the wrong file format… Illustrator EPS files only have one bounding box…
Resaving your file to the native AI format and including PDF compatibility will allow you better features…
Once done use PDF options as just show here…
Copy link to clipboard
Copied
Thanks a lot guys for the quick feedback!
Yes, I did find the pdfPlacePreferences in the app - that is what I was looking for.
And yes, I also found EPS have only one page/box.
Copy link to clipboard
Copied
Hi,
There is a app.pdfPlacePreferences to set before calling a place method. I mean;
To place 3rd page of mFile into selected graphic frame use:
app.pdfPlacePreferences.pageNumber = 3;
app.selection[0].place(mFile);
Above should work for PDF and AI files.
For INDD file set app.importedPageAttributes.pageNumber property.
Jarek