Pages

A collection of pages.

Methods

Pageadd ([at:
LocationOptions=UNKNOWN ][, reference:
any][, withProperties:
Object])
Creates a new page.

Parameter Type Description
at LocationOptions
:
BEFORE
AFTER
AT_END
AT_BEGINNING
UNKNOWN
The location of the new page relative to the reference object or within the document or spread. (Optional) (default: UNKNOWN )
reference Page
Spread
MasterSpread
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)

PageanyItem ()
Returns any Page in the collection.

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

Array of PageeveryItem ()
Returns every Page in the collection.

PagefirstItem ()
Returns the first Page in the collection.

Pageitem (index:
any)
Returns the Page with the specified index or name.

Parameter Type Description
index Long Integer
String
The index or name. Can accept: Long Integer or String.

PageitemByID (id:
number)
Returns the Page with the specified ID.

Parameter Type Description
id number The ID.

PageitemByName (name:
string)
Returns the Page with the specified name.

Parameter Type Description
name string The name.

Array of PageitemByRange (from:
any, to:
any)
Returns the Pages within the specified range.

Parameter Type Description
from Page
Long Integer
String
The Page, index, or name at the beginning of the range. Can accept: Page, Long Integer or String.
to Page
Long Integer
String
The Page, index, or name at the end of the range. Can accept: Page, Long Integer or String.

PagelastItem ()
Returns the last Page in the collection.

PagemiddleItem ()
Returns the middle Page in the collection.

PagenextItem (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.

PagepreviousItem (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.

Element of:

Document.pages
MasterSpread.pages
Spread.pages

Leave a Comment

Previous post:

Next post: