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

Highlight text using conditional text

Contributor ,
Feb 12, 2014 Feb 12, 2014

Copy link to clipboard

Copied

Hi,

     I need to highlight text using conditional text in InDesign.  I can highlight text using the below code.

var myDoc = app.activeDocument;

colorToHighlig = myDoc.conditions.add ({name:"Yellow",indicatorMethod:ConditionIndicatorMethod.USE_HIGHLIGHT, indicatorColor:UIColors.YELLOW});

app.findGrepPreferences = app.changeGrepPreferences = null;

app.changeGrepPreferences.appliedConditions = [colorToHighlig] ;

app.findGrepPreferences.findWhat = "chapter";

myDoc.changeGrep();

ConditionalTxt-IndicatorMode.png

But I need to set Indicator to "Show and Print" coz while generation pdf with indicator mode "show", highlights are missing in PDF.  I can retain those highlights with the indicator mode "Show and Print". Dono how to set it..

If anyone know, pls help me.

Thanks in advance,

Sudha K

TOPICS
Scripting

Views

645

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
Enthusiast ,
Feb 13, 2014 Feb 13, 2014

Copy link to clipboard

Copied

Hi,

it seems, that this one is not a property of the condition, it is a preference:

myDoc.conditionalTextPreferences.showConditionIndicators = ConditionIndicatorMode.SHOW_AND_PRINT_INDICATORS;

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
Contributor ,
Feb 14, 2014 Feb 14, 2014

Copy link to clipboard

Copied

LATEST

Hi,

Thank you so much.  Its working for me...

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