Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 77806

Re: How to extract images from adobe illustrator using extended javascript

$
0
0

var doc=app.activeDocument;

var placedItems=doc.placedItems;

var placedItemURL;
//as you told me images are in placed items , so i tried to count howmany placed items are in my document , and count came as 0
for(i=0;i<placedItems.length;i++)
{
    placedItemURL=placedItems[i].uRL;
    $.writeln (i+"th placedItemURL is :"+placedItemURL);
   
}


// and i checked for pathItems , so they are about 30 and all are images , i need to capture them individually and store them independently as 30 files
var pathItems=app.activeDocument.PathItems;
var pathitemposition=0;
for(i=0;i<app.activeDocument.pathItems.length;i++)
{
    pathItems=app.activeDocument.pathItems[i].selected;
    pathitemposition=app.activeDocument.pathItems[i].position;
    $.writeln (i+"   path item url is :"+app.activeDocument.pathItems[i].URL+"x position:"+pathitemposition[0]+"y position:"+pathitemposition[1]);
   
   
}

//when i am running below line all the images are removing from illustrator artboard

app.activeDocument.pathItems.removeAll();

 

 

 

 

 

so my question is how to capture images in art board to independent files


Viewing all articles
Browse latest Browse all 77806

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>