Skip to main content
Inspiring
November 23, 2010
Question

Spot color used in indesign document

  • November 23, 2010
  • 3 replies
  • 2335 views

Hi all,

How to find spot color used (text, frame and any othe item) in Indesign document.

Please help me to write javascript code.

thanks,

mon

This topic has been closed for replies.

3 replies

Known Participant
December 8, 2010

export to idml, change to .zip and do a text-based search on the color you need.

Jongware
Community Expert
Community Expert
December 8, 2010

Cool! Yes, that ought to work ...

Inspiring
November 30, 2010

Anybody can help me on this. I still waiting for answer.

Thanks in advance for your support

MON

Loic.Aigon
Legend
November 23, 2010

var doc = app.activeDocument;
var spot = doc.swatches.item("mySpot");
var pi = doc.pageItems;
var piArr=[];

for(var i=0; i<pi.length; i++){
    try{
        if(pi.fillColor == spot|| pi.strokeColor == spot){
            piArr.push(pi);
        }
     }
    catch(e){}
}

alert(piArr.toString());

Jongware
Community Expert
Community Expert
November 23, 2010

Loic, that doesn't test individual characters (either fill or stroke), table lines or fills, underlines & strikethroughs, or paragraph rules. Just to mention a few

(I'm pretty sure there are more.)

But the OP might be able to tell if any/all of these could be in use.

Inspiring
November 24, 2010

Thanks for your reply on this.

But it does not show any spot color name used in my Indesign document.

Moreover, I want to find spot colors (any) which are used in my text, frames, lines, tables etc. in active document.

Hope it is possible.

Thanks,

Mon