A text frame.
Go to Property Listing | Method Listing
addPath, applyObjectStyle, bringForward, bringToFront, checkIn, checkOut, createOutlines, detach, duplicate, excludeOverlapPath, exportFile, extractLabel, fit, flipItem, getElements, insertLabel, intersectPath, makeCompoundPath, markup, minusBack, move, override, place, placeXML, recompose, releaseCompoundPath, remove, removeOverride, resetScaling, resize, revert, rotate, scaleTextAttributes, search, select, sendBackward, sendToBack, shear, store, subtractPath, toSource, toSpecifier, transformAgain, transformAgainIndividually, transformSequenceAgain, transformSequenceAgainIndividually
AnchoredObjectSetting, ArrowHead, BaselineFrameGridOption, BlendMode, Boolean, Buttons, Characters, ContentType, CornerEffects, DisplaySettingOptions, EndCap, EndJoin, FeatherCornerType, FeatherMode, Footnotes, FormFields, Graphic, GraphicLines, Groups, Guide, InsertionPoints, Layer, Lines, LockStateValues, Movie, Notes, Number, Object, ObjectStyle, Ovals, PageItem, PageItems, Paragraphs, Paths, Polygons, Rectangles, ShadowMode, Sound, SpecialCharacters, String, StrokeAlignment, StrokeCornerAdjustment, StrokeStyle, Swatch, Tables, TextColumns, TextFrame, TextFrameContents, TextFramePreference, TextFrames, TextPath, TextPaths, TextStyleRanges, TextWrapPreference, Texts, Words, XMLItem
BaselineFrameGridOption, TextFramePreference, TextWrapPreference
|
Property |
Type |
Access |
Description |
|---|---|---|---|
|
read/write |
The horizontal scale of the TextFrame relative to its containing object. |
||
|
read/write |
The rotation angle of the TextFrame relative to its containing object. (Range: -360 to 360) |
||
|
read/write |
The skewing angle of the TextFrame relative to its containing object. (Range: -360 to 360) |
||
|
read/write |
The vertical scale of the TextFrame relative to its containing object. |
||
|
readonly |
Lists all graphics contained by the TextFrame. |
||
|
readonly |
Lists all page items contained by the TextFrame. |
||
|
readonly |
Anchored object settings. |
||
|
read/write |
The object style applied to the TextFrame. |
||
|
readonly |
The XML element associated with the TextFrame. |
||
|
readonly |
Baseline frame grid option settings. |
||
|
read/write |
The blend mode used to combine the background with the color of the TextFrame. |
||
|
readonly |
A collection of buttons. |
||
|
readonly |
A collection of characters. |
||
|
read/write |
The type of content that a frame can contain. |
||
|
read/write |
The contents of the text frame. Can return: String, TextFrameContents enumerator or SpecialCharacters enumerator. |
||
|
read/write |
The shape to apply to corner points in a path. Note: corner effect differs from end join in that you can set a radius for a corner effect, whereas the rounded or beveled effect of an end join depends upon the stroke weight. |
||
|
read/write |
The radius of the corner |
||
|
read/write |
The end shape of an open path. |
||
|
read/write |
The corner join applied to the TextFrame. |
||
|
readonly |
The last text frame in the thread. Can return: TextFrame or TextPath. |
||
|
read/write |
The type of feathering. |
||
|
read/write |
The feather-enabling mode. |
||
|
Number (range 0 - 100) |
read/write |
The amount (as a percentage) of noise to apply to the feather. (Range: 0 to 100) |
|
|
read/write |
The width of the feathering. |
||
|
read/write |
The swatch (color, gradient, tint, or mixed ink) applied to the fill of the TextFrame. . Can also accept: String. |
||
|
Number (range 0 - 100) |
read/write |
The percent of tint to use in the TextFrame's fill color. (To specify a tint percent, use a number in the range of 0 to 100; to use the inherited or overridden value, use -1.) |
|
|
readonly |
A collection of footnotes. |
||
|
readonly |
A collection of form fields. |
||
|
read/write |
The swatch (color, gradient, tint, or mixed ink) applied to the gap of a dashed, dotted, or striped stroke. For information, see stroke type. |
||
|
Number (range 0 - 100) |
read/write |
The tint as a percentage of the gap color. (To specify a tint percent, use a number in the range of 0 to 100; to use the inherited or overridden value, use -1.) |
|
|
read/write |
The bounds of the TextFrame excluding the stroke width, in the format [y1, x1, y2, x2], which give the coordinates of the top-left and bottom-right corners of the bounding box. |
||
|
read/write |
The angle of a linear gradient applied to the fill of the TextFrame. (Range: -180 to 180) |
||
|
read/write |
The length (for a linear gradient) or radius (for a radial gradient) applied to the fill of the TextFrame. |
||
|
read/write |
The starting point (in page coordinates) of a gradient applied to the fill of the TextFrame, in the format [x, y]. |
||
|
read/write |
The angle of a linear gradient applied to the stroke of the TextFrame. (Range: -180 to 180) |
||
|
read/write |
The length (for a linear gradient) or radius (for a radial gradient) applied to the stroke of the TextFrame. |
||
|
read/write |
The starting point (in page coordinates) of a gradient applied to the stroke of the TextFrame, in the format [x, y]. |
||
|
readonly |
A collection of graphic lines. |
||
|
readonly |
A collection of groups. |
||
|
read/write |
The horizontal scaling applied to the TextFrame. |
||
|
readonly |
The unique ID of the TextFrame. |
||
|
readonly |
The index of the TextFrame within its containing object. |
||
|
readonly |
A collection of insertion points. |
||
|
read/write |
If true, the TextFrame blends in isolation. |
||
|
read/write |
The layer that the TextFrame is on. |
||
|
read/write |
If true, the TextFrame is a knockout group. |
||
|
read/write |
A property that can be set to any string. |
||
|
read/write |
The arrowhead applied to the start of the path. |
||
|
readonly |
A collection of lines. |
||
|
read/write |
Display performance options for the TextFrame. |
||
|
readonly |
The lock state. |
||
|
read/write |
If true, the TextFrame is locked. |
||
|
Number (range 1 - 500) |
read/write |
The limit of the ratio of stroke width to miter length before a miter (pointed) join becomes a bevel (squared-off) join. (Range: 1 to 500) |
|
|
read/write |
The next text frame in the thread. Can return: TextFrame or TextPath. |
||
|
read/write |
If true, the TextFrame does not print. |
||
|
readonly |
A collection of notes. |
||
|
Number (range 0 - 100) |
read/write |
The opacity of the TextFrame. (Range: 0 to 100) |
|
|
readonly |
A collection of ellipses. |
||
|
readonly |
If true, the story has overset text. |
||
|
read/write |
If true, the TextFrame's fill color overprints any underlying objects. If false, the fill color knocks out the underlying colors. |
||
|
read/write |
If true, the gap color overprints any underlying colors. If false, the gap color knocks out the underlying colors. |
||
|
read/write |
If true, the TextFrame's stroke color overprints any underlying objects. If false, the stroke color knocks out the underlying colors. |
||
|
readonly |
If true, the object originated on a master spread and was overridden. If false, the object either originated on a master spread and was not overridden, or the object did not originate on a master page. |
||
|
readonly |
An object that originated on a master page and has been overridden. Can return: PageItem, Guide, Graphic, Movie or Sound. |
||
|
readonly |
The page items collection, which can be used to process all page items in a container (such as a document, page, or group), regardless of type. |
||
|
readonly |
A collection of paragraphs. |
||
|
readonly |
The parent of the TextFrame (a Spread, MasterSpread, PageItem, Oval, Rectangle, Polygon, GraphicLine, Group, State, Document, Layer, Button, TextFrame, Story, Text, Word, Line, TextColumn, Paragraph, TextStyleRange, Cell, Table, InsertionPoint, Page, Character or Footnote). |
||
|
readonly |
The story that contains the text. |
||
|
readonly |
A collection of paths. |
||
|
readonly |
A collection of polygons. |
||
|
read/write |
The previous text frame in the thread. Can return: TextFrame or TextPath. |
||
|
read/write |
A property that allows setting of several properties at the same time. |
||
|
readonly |
A collection of rectangles. |
||
|
read/write |
The arrowhead applied to the end of the path. |
||
|
read/write |
The rotatation angle of the TextFrame. (Range: -360 to 360) |
||
|
read/write |
The blend mode to use for drawing the shadow. |
||
|
read/write |
The radius of the shadow blur. |
||
|
read/write |
The swatch (color or mixed ink) applied to the shadow. |
||
|
read/write |
The shadow mode. |
||
|
Number (range 0 - 100) |
read/write |
The amount (as a percentage) of noise to apply to the shadow. (Range: 0 to 100) |
|
|
Number (range 0 - 100) |
read/write |
The opacity of the shadow. (Range: 0 to 100) |
|
|
Number (range 0 - 100) |
read/write |
The amount (as a percentage) of the blur radius to use as the shadow footprint. (Range: 0 to 100) For information, see shadow blur radius. |
|
|
read/write |
The horizontal offset of the shadow. |
||
|
read/write |
The vertical offset of the shadow. |
||
|
read/write |
The skewing angle applied to the TextFrame. (Range: -360 to 360) |
||
|
readonly |
The first text frame in the thread. Can return: TextFrame or TextPath. |
||
|
read/write |
The stroke alignment applied to the TextFrame. |
||
|
read/write |
The swatch (color, gradient, tint, or mixed ink) applied to the stroke of the TextFrame. Can also accept: String. |
||
|
read/write |
The corner adjustment applied to the TextFrame. |
||
|
read/write |
The dash and gap measurements that define the pattern of a custom dashed line. Define up to six values (in points) in the format [dash1, gap1, dash2, gap2, dash3, gap3]. |
||
|
Number (range 0 - 100) |
read/write |
The percent of tint to use in object's stroke color. (To specify a tint percent, use a number in the range of 0 to 100; to use the inherited or overridden value, use -1.) |
|
|
read/write |
The stroke type |
||
|
read/write |
The weight (in points) to apply to the TextFrame's stroke. |
||
|
readonly |
A collection of tables. |
||
|
readonly |
A collection of text columns. |
||
|
readonly |
The index of the text frame within the story. |
||
|
readonly |
Text frame preference settings. |
||
|
readonly |
A collection of text frames. |
||
|
readonly |
A collection of text paths. |
||
|
readonly |
A collection of text style ranges. |
||
|
readonly |
The text wrap preference properties that define the default formatting for wrapping text around objects. |
||
|
readonly |
A collection of text objects. |
||
|
read/write |
The vertical scaling applied to the TextFrame. |
||
|
read/write |
The bounds of the TextFrame including the stroke width, in the format [y1, x1, y2, x2], which give the coordinates of the top-left and bottom-right corners of the bounding box. |
||
|
readonly |
A collection of words. |
PageItem addPath (with:Array of PageItem)
Creates a new page item by combining the TextFrame with other objects. Deletes the objects if they do not intersect.
undefined applyObjectStyle (using:ObjectStyle, [clearingOverrides:Boolean=Boolean], [clearingOverridesThroughRootObjectStyle:Boolean=Boolean])
Applies the specified object style.
|
Parameter |
Type |
Description |
|---|---|---|
|
using |
The object style to apply. |
|
|
clearingOverrides |
If true, clears the TextFrame's existing attributes before applying the style. (Optional) (default: true) |
|
|
clearingOverridesThroughRootObjectStyle |
If true, clears attributes and formatting applied to the TextFrame that are not defined in the object style. (Optional) (default: false) |
undefined bringForward ()
Brings the TextFrame forward one level in its layer.
undefined bringToFront ()
Brings the TextFrame to the front.
Boolean checkIn ()
Checks in the story.
Boolean checkOut ()
Checks out the story.
PageItem createOutlines ([deleteOriginal:Boolean=Boolean])
Converts text to outlines. Each line of text becomes a polygon object. When the converted text is a single letter that has no internal spaces or detached parts, the polygon contains only a single path. Note: To determine whether a font allows the creation of outlines, see allow outlines.
|
Parameter |
Type |
Description |
|---|---|---|
|
deleteOriginal |
If true, deletes the original text. If false, creates the outlines as separate object(s) on top of the text. (Optional) (default: true) |
undefined detach ()
Detaches an overridden master page item from the master page.
PageItem duplicate (by:Array of Number String)
Duplicates the TextFrame.
|
Parameter |
Type |
Description |
|---|---|---|
|
by |
The amount (in points) to offset the new TextFrame, in the format [x, y]. (Optional) |
PageItem excludeOverlapPath (with:Array of PageItem)
Creates a new page item by excluding the overlapping areas of the TextFrame and other objects.
undefined exportFile (format:Varies ExportFormat String, to:File, [showingOptions:Boolean=Boolean], using:PDFExportPreset)
Exports the object(s) to a file.
|
Parameter |
Type |
Description |
|---|---|---|
|
format |
The export format. Can accept: ExportFormat enumerator or String. |
|
|
to |
The path of the export file. |
|
|
showingOptions |
If true, prompts the user to select export options. (Optional) (default: false) |
|
|
using |
The export style to use. (Optional) |
String extractLabel (key:String)
Gets the label value associated with the specified key.
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
The key. |
undefined fit (given:FitOptions)
Applies the specified fit option to content in a frame.
|
Parameter |
Type |
Description |
|---|---|---|
|
given |
The fit option to use. |
undefined flipItem (given:FlipItemOptions, around:Array of Varies 2 Units AnchorPoint, [transformingContent:Boolean=Boolean])
Flip item about given axis
|
Parameter |
Type |
Description |
|---|---|---|
|
given |
flip item options |
|
|
around |
Array of 2 Units |
The point to flip around. Can accept: Array of 2 Units or AnchorPoint enumerator. (Optional) |
|
transformingContent |
If true then both the object and items within it are flipped (Optional) (default: true) |
Object getElements ()
Resolves the object specifier, creating an array of object references.
undefined insertLabel (key:String, value:String)
Sets the label to the value associated with the specified key.
PageItem intersectPath (with:Array of PageItem)
Creates a new page item by intersecting the TextFrame with other objects. Returns an error if the objects do not intersect.
PageItem makeCompoundPath (with:Array of PageItem)
Creates a compound path by combining the path(s) of the TextFrame with the paths of other objects.
|
Parameter |
Type |
Description |
|---|---|---|
|
with |
The other objects whose paths to include in the new compound path. |
undefined markup (using:XMLElement)
Associates the page item with the specified XML element while preserving existing content.
|
Parameter |
Type |
Description |
|---|---|---|
|
using |
The XML element. |
PageItem minusBack (with:Array of PageItem)
Creates a new page item by reverse subtracting the overlapping areas of the TextFrame and other objects.
undefined move (to:Array of Varies 2 Units Page Spread Layer, by:Array of Number String, [transformingContent:Boolean=Boolean])
Move Page Item to a new location. One of the 'To' or 'By' parameters is required.
|
Parameter |
Type |
Description |
|---|---|---|
|
to |
Array of 2 Units |
The new location of the object. Can accept: Array of 2 Units, Spread, Page or Layer. (Optional) |
|
by |
Amount by which to move the object relative to its current position (Optional) |
|
|
transformingContent |
If true then both the object and items within it are moved (Optional) (default: true) |
Varies override (destinationPage:Page)
Overrides a master page item and places the item on the document page as a new object.
|
Parameter |
Type |
Description |
|---|---|---|
|
destinationPage |
The document page that contains the master page item to override. |
Varies place (fileName:File, [showingOptions:Boolean=Boolean], withProperties:Object)
Place a file
|
Parameter |
Type |
Description |
|---|---|---|
|
fileName |
The file to place |
|
|
showingOptions |
Whether to display the import options dialog (Optional) (default: false) |
|
|
withProperties |
Initial values for properties of the placed object(s) (Optional) |
undefined placeXML (using:XMLElement)
Places XML content into the specified object. Note: Replaces any existing content.
|
Parameter |
Type |
Description |
|---|---|---|
|
using |
The XML element whose content you want to place. |
undefined recompose ()
Recomposes the text in the TextFrame.
PageItem releaseCompoundPath ()
Releases a compound path.
undefined remove ()
Deletes the TextFrame.
undefined removeOverride ()
Removes the override from a previously overridden master page item.
undefined resetScaling ()
Resets the TextFrame's scaling to 100%. Note: This does not change the size of the TextFrame. Instead, it makes the current size of the TextFrame the basis for future scaling.
undefined resize (horizontalScale:Number, verticalScale:Number, around:Array of Varies 2 Units AnchorPoint, [consideringCurrentScale:Boolean=Boolean], [transformingContent:Boolean=Boolean], [consideringParentsScale:Boolean=Boolean])
Resize the page item. You must specify either horizontal scale or vertical scale or both.
|
Parameter |
Type |
Description |
|---|---|---|
|
horizontalScale |
The percentage of horizontal scale (Optional) |
|
|
verticalScale |
The percentage of vertical scale (Optional) |
|
|
around |
Array of 2 Units |
The point to scale around. Can accept: Array of 2 Units or AnchorPoint enumerator. (Optional) |
|
consideringCurrentScale |
If true then the object's current scale and new scale will be combined. If false then the new value is absolute. The default value is false. (Optional) (default: false) |
|
|
transformingContent |
If true then both the object and items within it are scaled (Optional) (default: true) |
|
|
consideringParentsScale |
If true then the object is scaled relative to its parent page item. If false it is scaled relative to the spread. (Optional) (default: false) |
Boolean revert ()
Reverts the document to its state at the last save operation.
undefined rotate (by:Number, around:Array of Varies 2 Units AnchorPoint, [consideringCurrentRotation:Boolean=Boolean], [transformingContent:Boolean=Boolean], [consideringParentsRotation:Boolean=Boolean])
Rotate the page item
|
Parameter |
Type |
Description |
|---|---|---|
|
by |
Angle by which to rotate the page item |
|
|
around |
Array of 2 Units |
The point to rotate around. Can accept: Array of 2 Units or AnchorPoint enumerator. (Optional) |
|
consideringCurrentRotation |
If true then the object's current rotation and new rotation will be combined. If false then the new value is absolute. The default value is false. (Optional) (default: false) |
|
|
transformingContent |
If true then both the object and items within it are rotated (Optional) (default: true) |
|
|
consideringParentsRotation |
If true then the object is rotated relative to its parent page item. If false it is rotated relative to the spread. Cannot rotate with considering current rotation and considering parents rotation both set at the same time. (Optional) (default: false) |
undefined scaleTextAttributes ()
Scales attributes of the text in the text frame to reflect scaling performed on the text frame. Note: Changes text attributes only when executed in the script after the text frame has been scaled.
Text search (for:String, wholeWord:Boolean, caseSensitive:Boolean, replacingWith:String, withFindAttributes:Object, withChangeAttributes:Object)
Look for occurrences of text that matches specific criteria
|
Parameter |
Type |
Description |
|---|---|---|
|
for |
What to look for (Optional) |
|
|
wholeWord |
If true, then disregard text embedded within a larger word (Optional) |
|
|
caseSensitive |
If true, then search only for text that matches case (Optional) |
|
|
replacingWith |
What to replace the found text with, either a string or a special character (Optional) |
|
|
withFindAttributes |
A record of find preference settings to use (Optional) |
|
|
withChangeAttributes |
A record of change preference settings to use (Optional) |
undefined select ([existingSelection:SelectionOptions=SelectionOptions])
Selects the object.
|
Parameter |
Type |
Description |
|---|---|---|
|
existingSelection |
The selection status of the TextFrame in relation to previously selected objects. (Optional) (default: SelectionOptions.REPLACE_WITH) |
undefined sendBackward ()
Sends the TextFrame back one level in its layer.
undefined sendToBack ()
Sends the TextFrame to the back.
undefined shear (by:Number, around:Array of Varies 2 Units AnchorPoint, [shearAxisAngle:Number=Number], [consideringCurrentShear:Boolean=Boolean], [transformingContent:Boolean=Boolean], [consideringParentsShear:Boolean=Boolean])
Shear the page item
|
Parameter |
Type |
Description |
|---|---|---|
|
by |
Angle by which to shear the object |
|
|
around |
Array of 2 Units |
The point to shear around. Can accept: Array of 2 Units or AnchorPoint enumerator. (Optional) |
|
shearAxisAngle |
The amount that the shear axis is rotated. If 0 degree then shear at its horizontal axis. If 90 degrees then shear at the vertical axis. (Optional) (default: 0) |
|
|
consideringCurrentShear |
If true then the object's current shear and new shear will be combined. If false then the new value is absolute. The default value is false. (Optional) (default: false) |
|
|
transformingContent |
If true then both the object and items within it are sheared (Optional) (default: true) |
|
|
consideringParentsShear |
If true then the object is sheared relative to its parent page item. If false it is sheared relative to the spread. Cannot shear with considering current shear and considering parents shear both set at the same time. (Optional) (default: false) |
Asset store (using:Library)
Store a page item in a library
|
Parameter |
Type |
Description |
|---|---|---|
|
using |
The library in which to store |
PageItem subtractPath (with:Array of PageItem)
Creates a new page item by subtracting the overlapping areas of the TextFrame and other objects.
String toSource ()
Generates a string which, if executed, will return the TextFrame.
String toSpecifier ()
Retrieves the object specifier.
String transformAgain ()
Transforms the TextFrame using the last transformation performed on any object. Transformations include moving, rotating, shearing, scaling, and flipping.
String transformAgainIndividually ()
Transforms the TextFrame using the last transformation performed on any TextFrame. Transformations include moving, rotating, shearing, scaling, and flipping.
String transformSequenceAgain ()
Transforms the TextFrame using the last sequence of transform operations performed on any single object or performed at the same time on any group of objects. Transformations include moving, rotating, shearing, scaling, and flipping.
String transformSequenceAgainIndividually ()
Transforms the TextFrame using the last sequence of transformations performed on any single object or performed at the same time on any group of objects. Transformations include moving, rotating, shearing, scaling, and flipping.
TextFrame.startTextFrame
TextPath.startTextFrame
TextFrame.endTextFrame
TextPath.endTextFrame
TextFrame.nextTextFrame
TextPath.nextTextFrame
AnchoredObjectSetting.parent
BaselineFrameGridOption.parent
Button.parent
Character.parent
Footnote.parent
FormField.parent
GraphicLine.parent
Group.parent
InsertionPoint.parent
Line.parent
Note.parent
Oval.parent
PageItem.parent
Paragraph.parent
Path.parent
Polygon.parent
Rectangle.parent
Table.parent
Text.parent
TextColumn.parent
TextFrame.parent
TextFramePreference.parent
TextPath.parent
TextStyleRange.parent
TextWrapPreference.parent
Word.parent
TextFrame.previousTextFrame
TextPath.previousTextFrame
Footnote.footnoteTextFrame
Note.parentTextFrame