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

how to change indesign composer

Community Beginner ,
Feb 12, 2020 Feb 12, 2020

aAs.png

I will change world ready single-line composer 

TOPICS
Scripting
2.9K
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

correct answers 1 Correct answer

Community Expert , Feb 12, 2020 Feb 12, 2020

Try the following

 

var myDoc = app.documents[0];
var para = myDoc.allParagraphStyles;
for (var i = 0; i < para.length; i++) 
{
	if(para[i].name != "[No Paragraph Style]")
		para[i].composer = "Adobe World-Ready Single-line Composer";
}

 

 

As a practice we should not also change the properties of Basic Paragraph Style, so the above code can be changed accordingly by adding the condition to the if statement. The reason your code was failing was that it would change the No Paragraph Style as well

...
Translate
Community Expert ,
Feb 12, 2020 Feb 12, 2020

It is done in the very same dialog you show us. I don't understand your problem?

Why do you need the World Composer? With which language do you work?

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 Beginner ,
Feb 12, 2020 Feb 12, 2020

working indesign javscript. how change paragraph style >justification >composer 

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 ,
Feb 12, 2020 Feb 12, 2020

Try the following

app.documents[0].paragraphStyles.itemByName("article_category").composer = "Adobe World-Ready Single-line Composer"

 

-Manan

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 Beginner ,
Feb 12, 2020 Feb 12, 2020

var myDoc = app.documents[0];
var para = myDoc.allParagraphStyles;
for (var i = 0; i < para.length; i++) {
para[i].composer = "Adobe Single-line Composer";

}

is not working

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 ,
Feb 12, 2020 Feb 12, 2020

Try the following

 

var myDoc = app.documents[0];
var para = myDoc.allParagraphStyles;
for (var i = 0; i < para.length; i++) 
{
	if(para[i].name != "[No Paragraph Style]")
		para[i].composer = "Adobe World-Ready Single-line Composer";
}

 

 

As a practice we should not also change the properties of Basic Paragraph Style, so the above code can be changed accordingly by adding the condition to the if statement. The reason your code was failing was that it would change the No Paragraph Style as well which is not permissible.

 

-Manan

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 Beginner ,
Feb 12, 2020 Feb 12, 2020
LATEST

Thanks manan

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 ,
Feb 12, 2020 Feb 12, 2020

Hi raja,

look into the property composer of object Paragraph or ParagraphStyle.

Apply this string as value for Adobe World-Ready Single-line Composer:

"$ID/HL Single Optyca"

This will work for all language versions of InDesign that support the Adobe World-Ready composers.

 

Here the list of composer strings that are supported by InDesign CS6 and above:

/*

"$ID/HL Single J" > Adobe Japanese Single-line Composer
"$ID/HL Composer J" > Adobe Japanese Paragraph Composer

"$ID/HL Single" > Adobe Single-line Composer
"$ID/HL Composer" > Adobe Paragraph Composer

"$ID/HL Single Optyca" >  Adobe World-Ready Single-line Composer
"$ID/HL Composer Optyca"  > Adobe World-Ready Composer

*/

 

Regards,
Uwe Laubender

( ACP )

 

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