Copy link to clipboard
Copied
I have been trying to extract the name of image placed in a particular rectangular using this code.
var doc = app.activeDocument;
var link;
var link_count = doc.links.length;
var i;
var rectangle, image;
for(i =1; i < link_count; i++){
rectangle = doc.rectangles;
//image = rectangle.getElements();
image = rectangle.images
$.writeln(image[0].name);
rectangle.label = image[0].name;
}
But the result is undefined. Kindly help me on this code
Have something to add?