Hello,
i am trying to create a display alert if the illustrator document has white overprint in it. but it is not working as expected.
var doc = app.activeDocument;
for (var i = 0; i < doc.pageItems.length; i++) {
var item = doc.pageItems[i];
var fill = item.fillColor;
if (fill != null) {
if (fill.typename == 'SpotColor' && fill.colorType == ColorModel.SPOT && fill.tint == 100 && fill.spot.name != '[Registration]') {
// Check for white spot color that is not registration color
alert('White overprint detected in item ' + item.name);
} else if (fill.typename == 'NoColor') {
// Check for fill set to [Paper]
alert('Item ' + item.name + ' has fill set to [Paper], indicating a possible white overprint');
}
}
}