Adobe InDesign CS6 (8.0) Object Model JS: Spreads

InDesign CS6

Class

Spreads

 A collection of 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

Spread [] (index: number)
Returns the Spread with the specified index.

ParameterTypeDescription
indexnumberThe index.

Spread add ([at: LocationOptions=LocationOptions.UNKNOWN][, reference: varies][, withProperties: Object])
Creates a new spread.

ParameterTypeDescription
atLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The location of the spread relative to the reference object or within the document. (Optional) (default: LocationOptions.UNKNOWN)
referenceDocument
Spread
The reference object. Note: Required when the at parameter specifies before or after. Can accept: Spread or Document. (Optional)
withPropertiesObjectInitial values for properties of the new Spread (Optional)

Spread anyItem ()
Returns any Spread in the collection.

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

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

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

Spread item (index: varies)
Returns the Spread with the specified index or name.

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

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

ParameterTypeDescription
idnumberThe ID.

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

ParameterTypeDescription
namestringThe name.

Array of Spread itemByRange (from: varies, to: varies)
Returns the Spreads within the specified range.

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

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

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

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

ParameterTypeDescription
objSpreadThe Spread whose index comes before the desired Spread.

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

ParameterTypeDescription
objSpreadThe index of the Spread that follows the desired Spread.

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

Element of

Document.spreads

Jongware, 28-Apr-2012 v3.0.3hContents :: Index