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

Did not Fix OverPrint on Chinese font...???

Engaged ,
Aug 13, 2015 Aug 13, 2015

Copy link to clipboard

Copied

Hi Everyone!,

This is Yajiv and I am purely new baby to this illustrator scripts. I need guidance to solve my problem.

I have an Illustrator documents contains text with Chinese font. Text color 100% process black and I need to fix OverPrint.

85% of texts convert into over print but some of character did not convert into OverPrint. Kindly guide to solve this problem.

Thanks,

- yajiv

Sample Text : 电脑贸易 (88-88)

Code:

CheckOverPrintoftheObject(0,0,0,100,false,true);

function CheckOverPrintoftheObject(c,m,y,k,flg1,flg2){

    // To check Text as Over Print........

        count = docRef.textFrames.length;

        //alert(count);

        for ( i = 0; i < count; i++ ) {

            textArt = activeDocument.textFrames;

            //alert(textArt.words.length);

            for ( j = 0; j < textArt.words.length; j++) {

                word = textArt.words;

                var SWColor = word.fillColor;

                var SWSTColor = word.strokeColor;

                if (SWColor.typename=="CMYKColor"){

                    //alert("in CMYK Fill ");

                    var c1=Math.round(SWColor.cyan);

                    var m1=Math.round(SWColor.magenta);

                    var y1=Math.round(SWColor.yellow);

                    var k1=Math.round(SWColor.black);

                

                if (( c1 == c ) && ( m1 == m) && ( y1 == y ) && ( k1 == k ) && (word.characterAttributes.overprintFill==flg1)) {

                word.characterAttributes.overprintFill=flg2;

                }

            }

        }

    }

}

TOPICS
Scripting

Views

346

Translate

Translate

Report

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

correct answers 1 Correct answer

Guide , Aug 13, 2015 Aug 13, 2015

you have a few "var" declarations missing. just for good practice

I think to be reliable you need to cycle Chars not words.

I ran this on some sample text and circled the text that has been set to overprint.

you can see that it seems to look at the first Char in the word and assumes the whole word is the same formatting.

ttt.JPG

Votes

Translate

Translate
Adobe
Guide ,
Aug 13, 2015 Aug 13, 2015

Copy link to clipboard

Copied

you have a few "var" declarations missing. just for good practice

I think to be reliable you need to cycle Chars not words.

I ran this on some sample text and circled the text that has been set to overprint.

you can see that it seems to look at the first Char in the word and assumes the whole word is the same formatting.

ttt.JPG

Votes

Translate

Translate

Report

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
Engaged ,
Aug 13, 2015 Aug 13, 2015

Copy link to clipboard

Copied

This works perfect!  Thank you so much, Qwertyfly! 

- yajiv

Code:

CheckOverPrintoftheObject(0,0,0,100,false,true);

function CheckOverPrintoftheObject(c,m,y,k,flg1,flg2){

    var docRef = app.activeDocument; 

    // To check Text as Over Print........

        var count = docRef.textFrames.length;

        for ( i = 0; i < count; i++ ) {

            var textArt = activeDocument.textFrames;

            for ( j = 0; j < textArt.characters.length; j++) {

                var word = textArt.characters;

                var SWColor = word.fillColor;

                var SWSTColor = word.strokeColor;

                if (SWColor.typename=="CMYKColor"){

                    //alert("in CMYK Fill ");

                    var c1=Math.round(SWColor.cyan);

                    var m1=Math.round(SWColor.magenta);

                    var y1=Math.round(SWColor.yellow);

                    var k1=Math.round(SWColor.black);

                    //alert("( "+c1+" == "+c+" ) && ( "+m1+ "== "+m+") && ( "+y1+ "== "+y+" ) && ( "+k1+" == "+k+" ) && ("+word.characterAttributes.fillOverprint+"=="+flg1+")");   

                if (( c1 == c ) && ( m1 == m) && ( y1 == y ) && ( k1 == k ) && (word.characterAttributes.overprintFill==flg1)) {

                word.characterAttributes.overprintFill=flg2;

                }

            }

        }

    }

}

Votes

Translate

Translate

Report

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
Guide ,
Aug 13, 2015 Aug 13, 2015

Copy link to clipboard

Copied

LATEST

Glad I could help

Votes

Translate

Translate

Report

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