跳转到内容

ParagraphAttributes

app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes

指定文本框中段落的属性和特性。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.autoLeadingAmount

自动行距量,以百分比表示。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.bunriKinshi

如果为 true,则启用 BunriKinshi。

布尔值。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.burasagariType

Burasagari 类型。

BurasagariTypeEnum


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.desiredGlyphScaling

期望的字形缩放,以默认字符宽度的百分比表示。

范围:50.0 到 200.0。在 100.0 时,字符宽度不变。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.desiredLetterSpacing

期望的字母间距,以默认字距或跟踪的百分比表示。

范围:-100.0 到 500.0。在 0 时,字母之间不添加空格。在 100.0 时,字母之间添加一个完整的空格宽度。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.desiredWordSpacing

期望的单词间距,以字体默认空格的百分比表示。

范围:0.0 到 1000.0;在 100.00 时,单词之间不添加空格。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.everyLineComposer

如果为 true,则启用每行排版器。如果为 false,则启用单行排版器。

布尔值。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.firstLineIndent

首行左缩进,以点为单位。

数字(双精度)。


ParagraphAttributes.hyphenateCapitalizedWords

Section titled “ParagraphAttributes.hyphenateCapitalizedWords”

app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.hyphenateCapitalizedWords

如果为 true,则对首字母大写的单词启用连字符。

布尔值。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.hyphenation

如果为 true,则为段落启用连字符。

布尔值。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.hyphenationPreference

连字符偏好比例,用于更好的间距(0)或更少的连字符(1)。

范围:0.0 到 1.0。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.hyphenationZone

从段落右边缘开始的距离(以点为单位),标记不允许连字符的部分。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.justification

段落对齐方式。

Justification


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.kinsoku

Kinsoku Shori 名称。

字符串。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.kinsokuOrder

首选的 Kinsoku 顺序。

KinsokuOrderEnum


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.kurikaeshiMojiShori

如果为 true,则启用 KurikaeshiMojiShori。

布尔值。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.leadingType

自动行距类型。

AutoLeadingType


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.leftIndent

左边距缩进,以点为单位。

数字(双精度)。


ParagraphAttributes.maximumConsecutiveHyphens

Section titled “ParagraphAttributes.maximumConsecutiveHyphens”

app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.maximumConsecutiveHyphens

连续连字符行的最大数量。

数字(长整型)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.maximumGlyphScaling

最大字形缩放,以默认字符宽度的百分比表示。

范围:50.0 到 200.0;在 100.0 时,字符宽度不变。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.maximumLetterSpacing

最大字母间距,以默认字距或跟踪的百分比表示。

范围:-100.0 到 500.0;在 0 时,字母之间不添加空格。在 100.0 时,字母之间添加一个完整的空格宽度。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.maximumWordSpacing

最大单词间距,以字体默认空格的百分比表示。

范围:0.0 到 1000.0;在 100.00 时,单词之间不添加空格。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.minimumAfterHyphen

连字符后的最小字符数。

数字(长整型)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.minimumBeforeHyphen

连字符前的最小字符数。

数字(长整型)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.minimumGlyphScaling

最小字形缩放,以默认字符宽度的百分比表示。

范围:50.0 到 200.0。在 100.0 时,字符宽度不变。

数字(双精度)。


ParagraphAttributes.minimumHyphenatedWordSize

Section titled “ParagraphAttributes.minimumHyphenatedWordSize”

app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.minimumHyphenatedWordSize

单词可连字符的最小字符数。

数字(长整型)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.minimumLetterSpacing

最小字母间距,以默认字距或跟踪的百分比表示。范围:-100.0 到 500.0;在 0 时,字母之间不添加空格。在 100.0 时,字母之间添加一个完整的空格宽度。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.minimumWordSpacing

最小单词间距,以字体默认空格的百分比表示。

范围:0.0 到 1000.0;在 100.00 时,单词之间不添加空格。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.mojikumi

Mojikumi 名称。

字符串。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.parent

对象的容器。

对象;只读。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.rightIndent

右边距缩进,以点为单位。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.romanHanging

如果为 true,则启用罗马悬挂标点符号。

布尔值。


ParagraphAttributes.singleWordJustification

Section titled “ParagraphAttributes.singleWordJustification”

app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.singleWordJustification

单个单词的对齐方式。

Justification


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.spaceAfter

段落后的间距,以点为单位。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.spaceBefore

段落前的间距,以点为单位。

数字(双精度)。


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.tabStops

制表符停止设置。

TabStopInfo


app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.typename

对象的类名。

字符串;只读。


// 创建一个新文档,包含 1 个文本框和 3 个段落
// 然后为每个段落设置不同的对齐方式
var docRef = documents.add();
var pathRef = docRef.pathItems.rectangle(600, 200, 200, 400);
var textRef = docRef.textFrames.areaText(pathRef);
textRef.paragraphs.add("左对齐段落。");
textRef.paragraphs.add("居中对齐段落。");
textRef.paragraphs.add("右对齐段落。");
textRef.textRange.characterAttributes.size = 28;
// 使用段落属性对象更改每个段落的对齐方式
var paraAttr_0 = textRef.paragraphs[0].paragraphAttributes;
paraAttr_0.justification = Justification.RIGHT;
var paraAttr_1 = textRef.paragraphs[1].paragraphAttributes;
paraAttr_1.justification = Justification.CENTER;
var paraAttr_2 = textRef.paragraphs[2].paragraphAttributes;
paraAttr_2.justification = Justification.LEFT;