Copy link to clipboard
Copied
hellow everyone
im trying to write some kind of "PREFLIGHT SCRIPT"
that i can preform before sending work to production
i managed to get the most of it done but im having problem with one thing.
i new a code that search all objects(beside text objects) in documents that are white
and check for overprint.
if so, the script will turn the overprint of.
can anyone help me write the scripe?
Thanks in advance
Copy link to clipboard
Copied
Someone did a plug-in for this a couple of versions back? I check in Acrobat…
Copy link to clipboard
Copied
in acrobat pro i noticed the is such a check in the prefligh that called - "white cmyk object set to overprint"
but how can i extract the code from there?
Copy link to clipboard
Copied
I mearly meant that I check my PDFs in Acrobat… In script you would have to crawl though every character of all text and every item… There are items you simple have NO access to via script and that is why I prefer to check outside the app… What if its used in one of these?
Copy link to clipboard
Copied
i got a code to cheack white text in overprint
my problem is to modify it to check everything in the document (all filled objects)
// Check for overprint white type.
if ( ( c + m + y + k ) == 0 && tr.characterAttributes.overprintFill ) {
if ( ! inBadOverprintType ) {
inBadOverprintType = true;
badOverprintType[ badOverprintIndex ] = new Object();
badOverprintType.contents = "";
}
if ( typeof( badOverprintType[badOverprintIndex].contents )=="undefined" ) {
badOverprintType[badOverprintIndex].contents = tr.contents;
} else {
badOverprintType[badOverprintIndex].contents += tr.contents;
}
badOverprintType[badOverprintIndex].cmyk = "" + c + " " + m + " " + y + " " + k;
inbadOverprintType = true;
} else {
if ( inBadOverprintType == true ) {
inBadOverprintType = false;
badOverprintIndex++;
}
}
debugln( "--> " + tr.contents + " is " + fillColor.typename + " " + c + " " + m + " " + y + " " + k );
}
Copy link to clipboard
Copied
please
can anyone help me find an answer?
Copy link to clipboard
Copied
Do you have to reinvent the Wheel? Ckeck here http://www.worker72a.com/72a_Pages/CS3_Plug-ins.htm#WOPD
Copy link to clipboard
Copied
yea i saw this but they dont have WINDOWS plugin...
but thank anyway
Copy link to clipboard
Copied
Dear Chibbi
I think this script is useful for the white overprint objects in illustrator. but it is not working on text parts.
Script:
var doc = app.activeDocument;
var thisfilledPath;
var thisStrokedPath;
function opWhiteStFl(){
function fillColorOp(){
var fillSel= doc.selection
fillSel = null;
for(var i=0; i < doc.pathItems.length; i++)
{
thisFilledPath = doc.pathItems;
if(thisFilledPath.filled && (Math.round(thisFilledPath.fillColor.cyan) == 0) &&
(Math.round(thisFilledPath.fillColor.magenta) == 0) &&
(Math.round(thisFilledPath.fillColor.yellow) == 0) &&
(Math.round(thisFilledPath.fillColor.black) == 0) && (thisFilledPath.fillOverprint)
)
{
thisFilledPath.selected = true;
}
};
};
fillColorOp();
function strokeColorOp(){
var strokeSel= doc.selection
strokeSel = null;
for(var i=0; i < doc.pathItems.length; i++)
{
thisStrokedPath = doc.pathItems;
if(thisStrokedPath.stroked && (Math.round(thisStrokedPath.strokeColor.cyan) == 0) &&
(Math.round(thisStrokedPath.strokeColor.magenta) == 0) &&
(Math.round(thisStrokedPath.strokeColor.yellow) == 0) &&
(Math.round(thisStrokedPath.strokeColor.black) == 0) && (thisStrokedPath.strokeOverprint)
)
{
thisStrokedPath.selected = true;
}
};
};
strokeColorOp();
function textFillColorOp(){
var fillSel= doc.selection
fillSel = null;
for(var i=0; i < doc.textFrames.length; i++)
{
thisFilledPath = doc.textFrames;
if(thisFilledPath.filled && (Math.round(thisFilledPath.fillColor.cyan) == 0) &&
(Math.round(thisFilledPath.fillColor.magenta) == 0) &&
(Math.round(thisFilledPath.fillColor.yellow) == 0) &&
(Math.round(thisFilledPath.fillColor.black) == 0) && (thisFilledPath.fillOverprint)
)
{
thisFilledPath.selected = true;
}
};
};
textFillColorOp();
};
opWhiteStFl();
Copy link to clipboard
Copied
Just need to do the opposite in this script (make black white and make overprint from true to false and false to true):
Find more inspiration, events, and resources on the new Adobe Community
Explore Now