Pages

A collection of pages.

Methods:

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

Property Listing

Property

Type

Access

Description

length

Number

readonly

The number of objects in the collection.

Method Listing

Page [] (index:Number)

Returns the Page with the specified index.

Parameter

Type

Description

index

Number

The index.

Page add ([at:LocationOptions=LocationOptions], reference:Varies MasterSpread Page Spread Document, withProperties:Object)

Creates a new page.

Parameter

Type

Description

at

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

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

(default: LocationOptions.UNKNOWN)

reference

MasterSpread

Page

Spread

Document

The reference object. Note: Required when the at parameter value specifies before or after. Can accept: Page, Spread, MasterSpread or Document. (Optional)

withProperties

Object

Initial values for properties of the new Page (Optional)

Page anyItem ()

Returns any Page in the collection.

Number count ()

Displays the number of elements in the Page.

Page everyItem ()

Returns every Page in the collection.

Page firstItem ()

Returns the first Page in the collection.

Page item (index:Varies LongInteger String)

Returns the Page with the specified index or name.

Parameter

Type

Description

index

LongInteger

String

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

Page itemByID (id:Number)

Returns the Page with the specified ID.

Parameter

Type

Description

id

Number

The ID.

Page itemByName (name:String)

Returns the Page with the specified name.

Parameter

Type

Description

name

String

The name.

Page itemByRange (from:Varies LongInteger Page String, to:Varies LongInteger Page String)

Returns the Pages within the specified range.

Parameter

Type

Description

from

LongInteger

Page

String

The Page, index, or name at the beginning of the range. Can accept: Page, Long Integer or String.

to

LongInteger

Page

String

The Page, index, or name at the end of the range. Can accept: Page, Long Integer or String.

Page lastItem ()

Returns the last Page in the collection.

Page middleItem ()

Returns the middle Page in the collection.

Page nextItem (obj:Page)

Returns the Page whose index follows the specified Page in the collection.

Parameter

Type

Description

obj

Page

The Page whose index comes before the desired Page.

Page previousItem (obj:Page)

Returns the Page with the index previous to the specified index.

Parameter

Type

Description

obj

Page

The index of the Page that follows the desired Page.

String toSource ()

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

Object of

Document.pages

Spread.pages

MasterSpread.pages