ParagraphAttributes
ParagraphAttributes
Section titled “ParagraphAttributes”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes
指定文本框中段落的属性和特性。
ParagraphAttributes.autoLeadingAmount
Section titled “ParagraphAttributes.autoLeadingAmount”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.autoLeadingAmount
自动行距量,以百分比表示。
数字(双精度)。
ParagraphAttributes.bunriKinshi
Section titled “ParagraphAttributes.bunriKinshi”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.bunriKinshi
如果为 true
,则启用 BunriKinshi。
布尔值。
ParagraphAttributes.burasagariType
Section titled “ParagraphAttributes.burasagariType”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.burasagariType
Burasagari 类型。
ParagraphAttributes.desiredGlyphScaling
Section titled “ParagraphAttributes.desiredGlyphScaling”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.desiredGlyphScaling
期望的字形缩放,以默认字符宽度的百分比表示。
范围:50.0 到 200.0。在 100.0 时,字符宽度不变。
数字(双精度)。
ParagraphAttributes.desiredLetterSpacing
Section titled “ParagraphAttributes.desiredLetterSpacing”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.desiredLetterSpacing
期望的字母间距,以默认字距或跟踪的百分比表示。
范围:-100.0 到 500.0。在 0 时,字母之间不添加空格。在 100.0 时,字母之间添加一个完整的空格宽度。
数字(双精度)。
ParagraphAttributes.desiredWordSpacing
Section titled “ParagraphAttributes.desiredWordSpacing”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.desiredWordSpacing
期望的单词间距,以字体默认空格的百分比表示。
范围:0.0 到 1000.0;在 100.00 时,单词之间不添加空格。
数字(双精度)。
ParagraphAttributes.everyLineComposer
Section titled “ParagraphAttributes.everyLineComposer”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.everyLineComposer
如果为 true
,则启用每行排版器。如果为 false
,则启用单行排版器。
布尔值。
ParagraphAttributes.firstLineIndent
Section titled “ParagraphAttributes.firstLineIndent”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.firstLineIndent
首行左缩进,以点为单位。
数字(双精度)。
ParagraphAttributes.hyphenateCapitalizedWords
Section titled “ParagraphAttributes.hyphenateCapitalizedWords”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.hyphenateCapitalizedWords
如果为 true
,则对首字母大写的单词启用连字符。
布尔值。
ParagraphAttributes.hyphenation
Section titled “ParagraphAttributes.hyphenation”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.hyphenation
如果为 true
,则为段落启用连字符。
布尔值。
ParagraphAttributes.hyphenationPreference
Section titled “ParagraphAttributes.hyphenationPreference”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.hyphenationPreference
连字符偏好比例,用于更好的间距(0)或更少的连字符(1)。
范围:0.0 到 1.0。
数字(双精度)。
ParagraphAttributes.hyphenationZone
Section titled “ParagraphAttributes.hyphenationZone”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.hyphenationZone
从段落右边缘开始的距离(以点为单位),标记不允许连字符的部分。
数字(双精度)。
ParagraphAttributes.justification
Section titled “ParagraphAttributes.justification”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.justification
段落对齐方式。
ParagraphAttributes.kinsoku
Section titled “ParagraphAttributes.kinsoku”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.kinsoku
Kinsoku Shori 名称。
字符串。
ParagraphAttributes.kinsokuOrder
Section titled “ParagraphAttributes.kinsokuOrder”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.kinsokuOrder
首选的 Kinsoku 顺序。
ParagraphAttributes.kurikaeshiMojiShori
Section titled “ParagraphAttributes.kurikaeshiMojiShori”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.kurikaeshiMojiShori
如果为 true
,则启用 KurikaeshiMojiShori。
布尔值。
ParagraphAttributes.leadingType
Section titled “ParagraphAttributes.leadingType”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.leadingType
自动行距类型。
ParagraphAttributes.leftIndent
Section titled “ParagraphAttributes.leftIndent”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.leftIndent
左边距缩进,以点为单位。
数字(双精度)。
ParagraphAttributes.maximumConsecutiveHyphens
Section titled “ParagraphAttributes.maximumConsecutiveHyphens”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.maximumConsecutiveHyphens
连续连字符行的最大数量。
数字(长整型)。
ParagraphAttributes.maximumGlyphScaling
Section titled “ParagraphAttributes.maximumGlyphScaling”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.maximumGlyphScaling
最大字形缩放,以默认字符宽度的百分比表示。
范围:50.0 到 200.0;在 100.0 时,字符宽度不变。
数字(双精度)。
ParagraphAttributes.maximumLetterSpacing
Section titled “ParagraphAttributes.maximumLetterSpacing”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.maximumLetterSpacing
最大字母间距,以默认字距或跟踪的百分比表示。
范围:-100.0 到 500.0;在 0 时,字母之间不添加空格。在 100.0 时,字母之间添加一个完整的空格宽度。
数字(双精度)。
ParagraphAttributes.maximumWordSpacing
Section titled “ParagraphAttributes.maximumWordSpacing”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.maximumWordSpacing
最大单词间距,以字体默认空格的百分比表示。
范围:0.0 到 1000.0;在 100.00 时,单词之间不添加空格。
数字(双精度)。
ParagraphAttributes.minimumAfterHyphen
Section titled “ParagraphAttributes.minimumAfterHyphen”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.minimumAfterHyphen
连字符后的最小字符数。
数字(长整型)。
ParagraphAttributes.minimumBeforeHyphen
Section titled “ParagraphAttributes.minimumBeforeHyphen”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.minimumBeforeHyphen
连字符前的最小字符数。
数字(长整型)。
ParagraphAttributes.minimumGlyphScaling
Section titled “ParagraphAttributes.minimumGlyphScaling”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
单词可连字符的最小字符数。
数字(长整型)。
ParagraphAttributes.minimumLetterSpacing
Section titled “ParagraphAttributes.minimumLetterSpacing”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.minimumLetterSpacing
最小字母间距,以默认字距或跟踪的百分比表示。范围:-100.0 到 500.0;在 0 时,字母之间不添加空格。在 100.0 时,字母之间添加一个完整的空格宽度。
数字(双精度)。
ParagraphAttributes.minimumWordSpacing
Section titled “ParagraphAttributes.minimumWordSpacing”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.minimumWordSpacing
最小单词间距,以字体默认空格的百分比表示。
范围:0.0 到 1000.0;在 100.00 时,单词之间不添加空格。
数字(双精度)。
ParagraphAttributes.mojikumi
Section titled “ParagraphAttributes.mojikumi”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.mojikumi
Mojikumi 名称。
字符串。
ParagraphAttributes.parent
Section titled “ParagraphAttributes.parent”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.parent
对象的容器。
对象;只读。
ParagraphAttributes.rightIndent
Section titled “ParagraphAttributes.rightIndent”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.rightIndent
右边距缩进,以点为单位。
数字(双精度)。
ParagraphAttributes.romanHanging
Section titled “ParagraphAttributes.romanHanging”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.romanHanging
如果为 true
,则启用罗马悬挂标点符号。
布尔值。
ParagraphAttributes.singleWordJustification
Section titled “ParagraphAttributes.singleWordJustification”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.singleWordJustification
单个单词的对齐方式。
ParagraphAttributes.spaceAfter
Section titled “ParagraphAttributes.spaceAfter”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.spaceAfter
段落后的间距,以点为单位。
数字(双精度)。
ParagraphAttributes.spaceBefore
Section titled “ParagraphAttributes.spaceBefore”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.spaceBefore
段落前的间距,以点为单位。
数字(双精度)。
ParagraphAttributes.tabStops
Section titled “ParagraphAttributes.tabStops”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.tabStops
制表符停止设置。
ParagraphAttributes.typename
Section titled “ParagraphAttributes.typename”app.activeDocument.textFrames[index].paragraphs[index].paragraphAttributes.typename
对象的类名。
字符串;只读。
更改段落中的对齐方式
Section titled “更改段落中的对齐方式”// 创建一个新文档,包含 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;