Reply To: script needed to remove background colour

#81121
Keith Gilbert
Participant

This script will remove the background color from any rectangular picture box that contains an image:

var myDoc = app.activeDocument;
var myRectangleArray = myDoc.rectangles.everyItem().getElements();
for (var j = myRectangleArray.length – 1; j >= 0; j–) {
var myItem = myRectangleArray[j];
if ((myItem.graphics.length >0 ) || (myItem.images.length > 0)) {
myItem.fillColor = myDoc.swatches.item(“None”);
}
}

This article was last modified on January 26, 2016

Comments (0)

Loading comments...