Adobe InDesign CS2 (4.0) Object Model JS: MasterSpreads

InDesign CS2

Class

MasterSpreads

 A collection of master spreads.

QuickLinks

add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

MasterSpread add ([pagesPerSpread: number][, withProperties: Object])
Creates a new master spread.

ParameterTypeDescription
pagesPerSpreadnumberThe number of pages to include in the master spread. (Optional)
withPropertiesObjectInitial values for properties of the new MasterSpread (Optional)

MasterSpread anyItem ()
Returns any MasterSpread in the collection.

number count ()
Displays the number of elements in the MasterSpread.

Array of MasterSpread everyItem ()
Returns every MasterSpread in the collection.

MasterSpread firstItem ()
Returns the first MasterSpread in the collection.

MasterSpread item (index: any)
Returns the MasterSpread with the specified index or name.

ParameterTypeDescription
indexLong
String
The index or name. Can accept: Long or String.

MasterSpread itemByID (id: number)
Returns the MasterSpread with the specified ID.

ParameterTypeDescription
idnumberThe ID.

MasterSpread itemByName (name: string)
Returns the MasterSpread with the specified name.

ParameterTypeDescription
namestringThe name.

Array of MasterSpread itemByRange (from: any, to: any)
Returns the MasterSpreads within the specified range.

ParameterTypeDescription
fromLong
MasterSpread
String
The MasterSpread, index, or name at the beginning of the range. Can accept: MasterSpread, Long or String.
toLong
MasterSpread
String
The MasterSpread, index, or name at the end of the range. Can accept: MasterSpread, Long or String.

MasterSpread lastItem ()
Returns the last MasterSpread in the collection.

MasterSpread middleItem ()
Returns the middle MasterSpread in the collection.

MasterSpread nextItem (obj: MasterSpread)
Returns the MasterSpread whose index follows the specified MasterSpread in the collection.

ParameterTypeDescription
objMasterSpreadThe MasterSpread whose index comes before the desired MasterSpread.

MasterSpread previousItem (obj: MasterSpread)
Returns the MasterSpread with the index previous to the specified index.

ParameterTypeDescription
objMasterSpreadThe index of the MasterSpread that follows the desired MasterSpread.

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

Element of

Document.masterSpreads

Jongware, 27-Jun-2010 v3.0.3dContents :: Index