Hi I'm Trying to Embed linked Images in Adobe Illustrator. I've edited some Javascript code to get the linked Images to Embed and It works fine for 1, 2 an 3 Images. When I try to embed a fourth Image the Image jumps/moves position before it embeds.
2 Answers
I use this simple script* to embed all images in an Illustrator doc.
I just tested it on 6 images at once and it works.
if ( app.documents.length > 0 ) {
while ( app.activeDocument.placedItems.length > 0 ) {
placedArt = app.activeDocument.placedItems[0];
placedArt.embed();
}
}
*I didn't create it myself, I'm not sure where exactly I got it from, but probably from this answer.
Thanks Welz, I'm still seeing the same result, the Graphics are changing position as they embed.
The code that worked for me is below. I had to set an array to stop the Images from Jumping:
var idoc = app.activeDocument.placedItems;
var iplaced = app.activeDocument.placedItems[0, 1];{
var p = 0; p > iplaced.length; p++;
var iplaced = app.activeDocument.placedItems[0];
iplaced.embed();
var iplaced = app.activeDocument.placedItems[1];
iplaced.embed();
var iplaced = app.activeDocument.placedItems[1];
iplaced.embed();