InDesign2026
API 21.5.1.73
Collection of Page

Pages

A collection of pages.

Properties

NameType AccessDescription
Number readonly The number of objects in the collection.

Methods

→ Page

Returns the Page with the specified index.

index Number The index.
→ Page

Creates a new page.

at? LocationOptions The location of the new page relative to the reference object or within the document or spread.
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.
withProperties? Object Initial values for properties of the new Page
→ Page

Returns any Page in the collection.

→ Number

Displays the number of elements in the Page.

→ Page[]

Returns every Page in the collection.

→ Page

Returns the first Page in the collection.

→ Page

Returns the Page with the specified index or name.

index LongInteger | String The index or name. Can accept: Long Integer or String.
→ Page

Returns the Page with the specified ID.

id Number The ID.
→ Page

Returns the Page with the specified name.

name String The name.
→ Page[]

Returns the Pages within the specified range.

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

Returns the last Page in the collection.

→ Page

Returns the middle Page in the collection.

→ Page

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

obj Page The Page whose index comes before the desired Page.
→ Page

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

obj Page The index of the Page that follows the desired Page.
→ String

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

Object of 3

Properties elsewhere that hold a Pages.