Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

help in a code - white overprint

Guest
Mar 06, 2012 Mar 06, 2012

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

TOPICS
Scripting
2.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guru ,
Mar 06, 2012 Mar 06, 2012

Someone did a plug-in for this a couple of versions back? I check in Acrobat…

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 06, 2012 Mar 06, 2012

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Mar 06, 2012 Mar 06, 2012

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 06, 2012 Mar 06, 2012

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 );

     

     

     

    

     }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 18, 2012 Mar 18, 2012

please

can anyone help me find an answer?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 18, 2012 Mar 18, 2012

Do you have to reinvent the Wheel?  Ckeck here http://www.worker72a.com/72a_Pages/CS3_Plug-ins.htm#WOPD

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 19, 2012 Mar 19, 2012

yea i saw this but they dont have WINDOWS plugin...

but thank anyway

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 23, 2018 Nov 23, 2018

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();

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2018 Nov 26, 2018
LATEST

Just need to do the opposite in this script (make black white and make overprint from true to false and false to true):

Apply overprint only to black objects & texts

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines