Skip to content

Instantly share code, notes, and snippets.

@sojack
Created September 24, 2011 15:47
Show Gist options
  • Save sojack/1239468 to your computer and use it in GitHub Desktop.
Save sojack/1239468 to your computer and use it in GitHub Desktop.
Adobe Illustrator - set overprint to false
var myDocument = activeDocument,
numberOfChangedItems = 0; // counts the number of items with overprint stroke or fill
//loop through all path items and set overprint to false:
for (var i = 0; i < myDocument.pathItems.length; i++) {
var myPath = myDocument.pathItems[i];
if (myPath.strokeOverprint == true | myPath.fillOverprint == true){numberOfChangedItems++;};
if (myPath.strokeOverprint == true){myPath.strokeOverprint = false; myPath.selected=true;};
if (myPath.fillOverprint == true){myPath.fillOverprint = false; myPath.selected=true;};
}
alert(numberOfChangedItems + " objects were changed." );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment