Web Analytics Made Easy -
StatCounter Find and reset CMYK values in pdf layers - CodingForum

Announcement

Collapse
No announcement yet.

Find and reset CMYK values in pdf layers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Find and reset CMYK values in pdf layers

    I'm using Adobe ExtendScript toolbar CS5. I've opened a CMYK pdf and am using JavaScript to search each layer's CMYK for its K (black) value. If its K value is greater than 1, I want to reset the CMYK values for that layer to 0, 0, 0, 90. The code I've come up with so far is as follows:

    Code:
    #target illustrator
    doc=activeDocument;
    
    for (i=0; i<doc.layers.length; i++)
    
        {       
     if (doc.layers[i].fillColor.CMYKColor.black > 1)
            {
                doc.layers[i].fillColor,color.CMYKColor.cyan.write(Number(90.00));
                doc.layers[i].fillColor,color.CMYKColor.magenta.write(Number(90.00));
                doc.layers[i].fillColor,color.CMYKColor.yellow.write(Number(90.00));
                doc.layers[i].fillColor,color.CMYKColor.black.write(Number(90.00));
            }
        }
Working...
X
😀
🥰
🤢
😎
😡
👍
👎