0

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.

  • Can you include your code here? – WELZ Jan 16 at 15:37
1

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.

0

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();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.