Adobe 0046100128056 Scripting Guide - Page 109
Span Columns, Setting Text Preferences
UPC - 718659087562
View all Adobe 0046100128056 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 109 highlights
CHAPTER 6: Text and Type Span Columns 109 Span Columns A paragraph layout can span multiple columns or split into subcolumns with the Span Columns attribute or Split Column attribute applied. The following script fragment shows how to set the Span Columns and Split Column style for a paragraph (for the complete script, see SpanColumns): var myDocument = app.activeDocument; var myPage = myDocument.pages.item(0); var myTextFrame = myPage.textFrames.item(0); myTextFrame.textFramePreferences.textColumnCount = 3; var myStory = myTextFrame.parentStory; //Split Column with(myStory.paragraphs[0]) { spanColumnType = SpanColumnTypeOptions.splitColumns; spanSplitColumnCount = 2; splitColumnOutsideGutter = 0; splitColumnInsideGutter = 1; } //Span Columns var mySpanIndex = Math.floor(myStory.paragraphs.length / 2); with(myStory.paragraphs[mySpanIndex]) { spanColumnType = SpanColumnTypeOptions.spanColumns; spanSplitColumnCount = SpanColumnCountOptions.all; } Setting Text Preferences The following script shows how to set general text preferences (for the complete script, see TextPreferences): //The following sets the text preferences for the application; to set the //text preferences for the front-most document, replace "app.textPreferences" with //"app.documents.item(0).textPreferences" with(app.textPreferences){ abutTextToTextWrap = true; //baseline shift key increment can range from .001 to 200 points. baselineShiftKeyIncrement = 1; highlightCustomSpacing = false; highlightHjViolations = true; highlightKeeps = true; highlightSubstitutedFonts = true; highlightSubstitutedGlyphs = true; justifyTextWraps = true; //kerning key increment value is 1/1000 of an em. kerningKeyIncrement = 10; //leading key increment value can range from .001 to 200 points. leadingKeyIncrement= 1; linkTextFilesWhenImporting = false; scalingAdjustsText = false; showInvisibles = true; smallCap = 60; subscriptPosition = 30;