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

How to overprint dashed strokes

New Here ,
May 25, 2018 May 25, 2018

Copy link to clipboard

Copied

I have this script and it works for what I need except that it should overprint all dashed strokes. I would really appreciate any help.

function opKoBlackRules(doc) { 

 

  var ruleWidth = 2, grayColor = 100, counterOp = 0, counterKo = 0; 

  for ( i = 0; i < doc.pathItems.length; i++ ) { 

  var currentPath = doc.pathItems

  if ( currentPath.strokeWidth < ruleWidth

  && currentPath.strokeColor.gray == grayColor

  && currentPath.strokeOverprint == false ) { 

  currentPath.strokeOverprint = true; 

  counterOp++; 

  }

  else if ( currentPath.strokeWidth >= ruleWidth

  && currentPath.strokeColor.gray == grayColor

  && currentPath.strokeOverprint == true ) { 

  currentPath.strokeOverprint = false; 

  counterKo++; 

  } 

  }

  }

TOPICS
Scripting

Views

243

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
Adobe
Community Expert ,
May 27, 2018 May 27, 2018

Copy link to clipboard

Copied

LATEST

I tested your code and all lines overprint property becomes "true".

スクリーンショット 2018-05-28 15.20.49.png

It seems to work fine.

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