MasterSpread

A master spread.

Methods:

addEventListener, contentPlace, createGuides, detach, duplicate, extractLabel, getElements, insertLabel, place, placeAndLink, remove, removeEventListener, removeOverride, resolve, select, toSource, toSpecifier, transform, transformValuesOf

Objects:

Boolean, Buttons, CheckBoxes, ComboBoxes, EPSTexts, EndnoteTextFrames, EventListeners, Events, FormFields, Graphic, GraphicLines, Groups, Guides, ListBoxes, MasterSpread, MultiStateObjects, NothingEnum, Number, Object, Ovals, PageColorOptions, PageItem, PageItems, Pages, Polygons, Preferences, RadioButtons, Rectangles, SignatureFields, SplineItems, String, TextBoxes, TextFrames, TimingSetting, UIColors,

Preferences:

Preferences

Property Listing

Property

Type

Access

Description

allGraphics

Array of Graphic

readonly

Lists all graphics contained by the MasterSpread.

allPageItems

Array of PageItem

readonly

Lists all page items contained by the MasterSpread.

appliedMaster

MasterSpread

NothingEnum.NOTHING

read/write

The master spread applied to the MasterSpread. Can also accept: NothingEnum enumerator.

baseName

String

read/write

The name of the master spread.

buttons

Buttons Button

readonly

A collection of buttons.

checkBoxes

CheckBoxes

readonly

A collection of checkboxes.

comboBoxes

ComboBoxes

readonly

A collection of comboboxes.

endnoteTextFrames

EndnoteTextFrames EndnoteTextFrame

readonly

A collection of endnote text frames.

epstexts

EPSTexts EPSText

readonly

EPSTexts

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

formFields

FormFields FormField

readonly

A collection of form fields.

graphicLines

GraphicLines GraphicLine

readonly

A collection of graphic lines.

groups

Groups Group

readonly

A collection of groups.

guides

Guides Guide

readonly

A collection of guides.

id

Number

readonly

The unique ID of the MasterSpread.

idmlComponentName

String

read/write

The IDML component name of the MasterSpread.

index

Number

readonly

The index of the MasterSpread within its containing object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

label

String

read/write

A property that can be set to any string.

listBoxes

ListBoxes

readonly

A collection of listboxes.

multiStateObjects

MultiStateObjects MultiStateObject

readonly

A collection of multi-state objects.

name

String

readonly

The name of the MasterSpread.

namePrefix

String

read/write

The prefix of the master spread name.

ovals

Ovals Oval

readonly

A collection of ellipses.

pageColor

Array of 3 Reals (0 - 255)

PageColorOptions

PageColorOptions.NOTHING

PageColorOptions.USE_MASTER_COLOR

UIColors

read/write

The color label of the MasterSpread, specified either as an array of three doubles, each in the range 0 to 255 and representing R, G, and B values, or as a UI color. Can return: Array of 3 Reals (0 - 255) or UIColors enumerator or PageColorOptions enumerator.

pageItems

PageItems PageItem

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.

pages

Pages Page

readonly

A collection of pages.

parent

Document

readonly

The parent of the MasterSpread (a Document).

polygons

Polygons Polygon

readonly

A collection of polygons.

preferences

Preferences Preference

readonly

A collection of preferences objects.

primaryTextFrame

PageItem

NothingEnum.NOTHING

read/write

The primary text frame through which text flows on the MasterSpread. Must be a text frame or a type on a path spline. Can also accept: NothingEnum enumerator.

properties

Object

read/write

A property that allows setting of several properties at the same time.

radioButtons

RadioButtons RadioButton

readonly

A collection of radio buttons.

rectangles

Rectangles Rectangle

readonly

A collection of rectangles.

showMasterItems

Boolean

read/write

If true, displays master page items on document pages in the spread.

signatureFields

SignatureFields SignatureField

readonly

A collection of signature fields.

splineItems

SplineItems SplineItem

readonly

The spline items collection.

textBoxes

TextBoxes

readonly

A collection of text boxes.

textFrames

TextFrames TextFrame

readonly

A collection of text frames.

timingSettings

TimingSetting

readonly

The object timing settings.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

Varies contentPlace (pageItems:Array of PageItem, [linkPageItems:Boolean=Boolean], [linkStories:Boolean=Boolean], [mapStyles:Boolean=Boolean], placePoint:Array of Number String, destinationLayer:Layer, [showingOptions:Boolean=Boolean])

Duplicate an object and place it into the target.

Parameter

Type

Description

pageItems

Array of PageItem

One or more page items to place or load

linkPageItems

Boolean

Whether to link pageItems in content placer (if true it will override link stories value) (Optional)

(default: false)

linkStories

Boolean

Whether to link stories in content placer (only applicable for single story, pageItem links will also be created in case of more than one item) (Optional)

(default: false)

mapStyles

Boolean

Whether to map styles in content placer (Optional)

(default: false)

placePoint

Array of Number

Array of String

The point at which to place (Optional)

destinationLayer

Layer

The layer on which to place (Optional)

showingOptions

Boolean

Whether to display the link options dialog (Optional)

(default: false)

undefined createGuides ([numberOfRows:Number=Number], [numberOfColumns:Number=Number], [rowGutter:Number String], [columnGutter:Number String], guideColor:Array of Varies 3 Reals (0 - 255) UIColors, [fitMargins:Boolean=Boolean], [removeExisting:Boolean=Boolean], layer:Layer)

Creates multiple guides on all pages of the spread.

Parameter

Type

Description

numberOfRows

Number (range 0 - 40)

The number of rows to create on each page. (Optional)

(default: 0)

numberOfColumns

Number (range 0 - 40)

The number of columns to create on each page. (Optional)

(default: 0)

rowGutter

Number

String

The height of the gutter between rows. (Optional)

columnGutter

Number

String

The width of the gutter between columns. (Optional)

guideColor

Array of 3 Reals (0 - 255)

UIColors

The color to make the guides, specified either as an array of three doubles, each in the range 0 to 255 and representing R, G, and B values, or as a UI color. Can accept: Array of 3 Reals (0 - 255) or UIColors enumerator. (Optional)

fitMargins

Boolean

If true, the row height and column width are calculated based on the space within the page margins. If false, row height and column width are calculated based on the full page. (Optional)

(default: false)

removeExisting

Boolean

If true, removes existing guides when creating new ones. (Optional)

(default: false)

layer

Layer

The layer on which to create the guides. (Optional)

undefined detach ()

Detaches an overridden master page item from the master page.

Varies duplicate ([to:LocationOptions=LocationOptions], reference:Varies Document MasterSpread MasterSpread)

Duplicates the spread.

Parameter

Type

Description

to

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

The location of the spread relative to the reference object or within the document. (Optional)

(default: LocationOptions.AT_END)

reference

Document

MasterSpread

The reference object. Note: Required only when the to parameter specifies before or after. Can accept: MasterSpread, Document or MasterSpread. (Optional)

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

MasterSpread 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.

Parameter

Type

Description

key

String

The key.

value

String

The value.

Varies place (fileName:File, placePoint:Array of Number String, destinationLayer:Layer, [showingOptions:Boolean=Boolean], [autoflowing:Boolean=Boolean], withProperties:Object)

Places the file.

Parameter

Type

Description

fileName

File

The file to place

placePoint

Array of Number

Array of String

The point at which to place (Optional)

destinationLayer

Layer

The layer on which to place (Optional)

showingOptions

Boolean

Whether to display the import options dialog (Optional)

(default: false)

autoflowing

Boolean

Whether to autoflow placed text (Optional)

(default: false)

withProperties

Object

Initial values for properties of the placed object(s) (Optional)

Story placeAndLink (parentStory:Story, placePoint:Array of Number String, destinationLayer:Layer, [showingOptions:Boolean=Boolean])

Deprecated: Use contentPlace method. Original Description: Create a linked story and place it into the target.

Parameter

Type

Description

parentStory

Story

The story to place and link from.

placePoint

Array of Number

Array of String

The point at which to place (Optional)

destinationLayer

Layer

The layer on which to place (Optional)

showingOptions

Boolean

Whether to display the link options dialog (Optional)

(default: false)

undefined remove ()

Deletes the MasterSpread.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined removeOverride ()

Removes the override from a previously overridden master page item.

Varies resolve (location:Array of Varies AnchorPoint AnchorPoints 2 Reals BoundingBoxLimitss CoordinateSpacess Arrays of 2 Reals LongIntegers, in:CoordinateSpaces, [consideringRulerUnits:Boolean=Boolean])

Get the coordinates of the given location in the specified coordinate system.

Parameter

Type

Description

location

AnchorPoint

AnchorPoint.BOTTOM_CENTER_ANCHOR

AnchorPoint.BOTTOM_LEFT_ANCHOR

AnchorPoint.BOTTOM_RIGHT_ANCHOR

AnchorPoint.CENTER_ANCHOR

AnchorPoint.LEFT_CENTER_ANCHOR

AnchorPoint.RIGHT_CENTER_ANCHOR

AnchorPoint.TOP_CENTER_ANCHOR

AnchorPoint.TOP_LEFT_ANCHOR

AnchorPoint.TOP_RIGHT_ANCHOR

AnchorPoints AnchorPoint

Array of 2 Reals

BoundingBoxLimitss BoundingBoxLimits

CoordinateSpacess CoordinateSpaces

Array of Arrays of 2 Reals

LongIntegers

The location requested. Can accept: Array of 2 Reals, AnchorPoint enumerator or Array of Arrays of 2 Reals, CoordinateSpaces enumerators, AnchorPoint enumerators, BoundingBoxLimits enumerators or Long Integers.

in

CoordinateSpaces

CoordinateSpaces.INNER_COORDINATES

CoordinateSpaces.PAGE_COORDINATES

CoordinateSpaces.PARENT_COORDINATES

CoordinateSpaces.PASTEBOARD_COORDINATES

CoordinateSpaces.SPREAD_COORDINATES

The coordinate space to use.

consideringRulerUnits

Boolean

If true then a ruler location is interpreted using ruler units rather than points. The default value is false. This parameter has no effect unless the reference point is specified relative to a page. (Optional)

(default: false)

undefined select ([existingSelection:SelectionOptions=SelectionOptions])

Selects the object.

Parameter

Type

Description

existingSelection

SelectionOptions

SelectionOptions.ADD_TO

SelectionOptions.REMOVE_FROM

SelectionOptions.REPLACE_WITH

SelectionOptions.SET_KEY

The selection status of the MasterSpread in relation to previously selected objects. (Optional)

(default: SelectionOptions.REPLACE_WITH)

String toSource ()

Generates a string which, if executed, will return the MasterSpread.

String toSpecifier ()

Retrieves the object specifier.

undefined transform (in:CoordinateSpaces, from:Array of Varies AnchorPoint AnchorPoints 2 Reals BoundingBoxLimitss CoordinateSpacess Arrays of 2 Reals LongIntegers, withMatrix:Array of Varies 6 Reals TransformationMatrix, replacingCurrent:Array of Varies MatrixContent enumerators MatrixContent LongInteger, [consideringRulerUnits:Boolean=Boolean])

Transform the page item.

Parameter

Type

Description

in

CoordinateSpaces

CoordinateSpaces.INNER_COORDINATES

CoordinateSpaces.PAGE_COORDINATES

CoordinateSpaces.PARENT_COORDINATES

CoordinateSpaces.PASTEBOARD_COORDINATES

CoordinateSpaces.SPREAD_COORDINATES

The coordinate space to use

from

AnchorPoint

AnchorPoint.BOTTOM_CENTER_ANCHOR

AnchorPoint.BOTTOM_LEFT_ANCHOR

AnchorPoint.BOTTOM_RIGHT_ANCHOR

AnchorPoint.CENTER_ANCHOR

AnchorPoint.LEFT_CENTER_ANCHOR

AnchorPoint.RIGHT_CENTER_ANCHOR

AnchorPoint.TOP_CENTER_ANCHOR

AnchorPoint.TOP_LEFT_ANCHOR

AnchorPoint.TOP_RIGHT_ANCHOR

AnchorPoints AnchorPoint

Array of 2 Reals

BoundingBoxLimitss BoundingBoxLimits

CoordinateSpacess CoordinateSpaces

Array of Arrays of 2 Reals

LongIntegers

The temporary origin during the transformation. Can accept: Array of 2 Reals, AnchorPoint enumerator or Array of Arrays of 2 Reals, CoordinateSpaces enumerators, AnchorPoint enumerators, BoundingBoxLimits enumerators or Long Integers.

withMatrix

Array of 6 Reals

TransformationMatrix

Transform matrix. Can accept: Array of 6 Reals or TransformationMatrix.

replacingCurrent

Array of MatrixContent enumerators

MatrixContent

MatrixContent.ROTATION_VALUE

MatrixContent.SCALE_VALUES

MatrixContent.SHEAR_VALUE

MatrixContent.TRANSLATION_VALUES

LongInteger

Transform components to consider; providing this optional parameter causes the target's existing transform components to be replaced with new values. Without this parameter, the given matrix is concatenated onto the target's existing transform combining the effect of the two. Can accept: MatrixContent enumerator, Array of MatrixContent enumerators or Long Integer. (Optional)

consideringRulerUnits

Boolean

If true then a ruler based origin is interpreted using ruler units rather than points. The default value is false. This parameter has no effect unless the reference point is specified relative to a page. (Optional)

(default: false)

TransformationMatrix transformValuesOf (in:CoordinateSpaces)

Get the transformation values of the page item.

Parameter

Type

Description

in

CoordinateSpaces

CoordinateSpaces.INNER_COORDINATES

CoordinateSpaces.PAGE_COORDINATES

CoordinateSpaces.PARENT_COORDINATES

CoordinateSpaces.PASTEBOARD_COORDINATES

CoordinateSpaces.SPREAD_COORDINATES

The coordinate space to use

Object of

LayoutWindow.activeSpread

MasterSpread.appliedMaster

Page.appliedMaster

Spread.appliedMaster

Button.parent

CheckBox.parent

ComboBox.parent

EPSText.parent

EndnoteTextFrame.parent

Event.parent

EventListener.parent

FormField.parent

GraphicLine.parent

Group.parent

Guide.parent

ListBox.parent

MultiStateObject.parent

MutationEvent.parent

Oval.parent

Page.parent

PageItem.parent

Polygon.parent

Preference.parent

RadioButton.parent

Rectangle.parent

SignatureField.parent

SplineItem.parent

TextBox.parent

TextFrame.parent

TimingSetting.parent

Return

MasterSpreads.add()

MasterSpread.getElements()

MasterSpreads.anyItem()

MasterSpreads.everyItem()

MasterSpreads.nextItem()

MasterSpreads.previousItem()

MasterSpreads.itemByID()

MasterSpreads.item()

MasterSpreads.[]()

MasterSpreads.itemByName()

MasterSpreads.itemByRange()

MasterSpreads.firstItem()

MasterSpreads.lastItem()

MasterSpreads.middleItem()