Adobe InDesign CS3 (5.0) Object Model JS: Page

InDesign CS3

Class

Page

 A page.

QuickLinks

detach, duplicate, extractLabel, getElements, insertLabel, move, place, placeXML, remove, removeOverride, setContent, toSource, toSpecifier

Hierarchy

Document | MasterSpread | Spread
Page
Button | FormField | GraphicLine | Group | Guide | MarginPreference | Oval | PageItem | Polygon | Rectangle | TextFrame

Properties

PropertyTypeAccessDescription
allGraphics Array of Graphic readonlyLists all graphics contained by the Page.
allPageItems Array of PageItem readonlyLists all page items contained by the Page.
appliedMasterMasterSpreadNothingEnum r/wThe master spread applied to the Page. Can also accept: NothingEnum enumerator.
appliedSectionSection readonlyThe section to which the page belongs.
appliedTrapPresetString
TrapPreset
r/wThe trap preset applied to the page. Can also accept: String.
bounds Array of Measurement Unit (Number or String) readonlyThe bounds of the Page, in the format [y1, x1, y2, x2].
buttonsButtons readonlyA collection of buttons.
documentOffsetnumber readonlyThe sequential number of the page within the document.
formFieldsFormFields readonlyA collection of form fields.
graphicLinesGraphicLines readonlyA collection of graphic lines.
groupsGroups readonlyA collection of groups.
guidesGuides readonlyA collection of guides.
idnumber readonlyThe unique ID of the Page.
indexnumber readonlyThe index of the Page within its containing object.
labelstring r/wA property that can be set to any string.
marginPreferencesMarginPreference readonlyMargin preference settings.
masterPageItems Array of
Graphics
Guides
Movies
PageItems
Sounds
readonlyThe items on a specified document page that originated on the applied master page and have not been overridden or detached. Can return: Array of PageItems, Guides, Graphics, Movies or Sounds.
namestring readonlyThe name of the Page.
ovalsOvals readonlyA collection of ellipses.
pageItemsPageItems readonlyThe page items collection, which can be used to process all page items in a container (such as a document, page, or group), regardless of type.
parentDocument
MasterSpread
Spread
readonlyThe parent of the Page (a Spread, MasterSpread or Document).
polygonsPolygons readonlyA collection of polygons.
propertiesObject r/wA property that allows setting of several properties at the same time.
rectanglesRectangles readonlyA collection of rectangles.
sidePageSideOptions:
PageSideOptions.RIGHT_HAND
PageSideOptions.LEFT_HAND
PageSideOptions.SINGLE_SIDED
readonlyThe side of the binding spine on which to place the page within the spread.
tabOrder Array of FormField r/wThe order in which the focus moves to different form fields in the PDF when the tab key is pressed.
textFramesTextFrames readonlyA collection of text frames.

Methods

Instances

void detach ()
Detaches an overridden master page item from the master page.

Page duplicate ([to: LocationOptions=LocationOptions.AT_END][, reference: any])
Duplicates the page.

ParameterTypeDescription
toLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The location at which to place the duplicate page relative to the reference object or within the document or spread. (Optional) (default: LocationOptions.AT_END)
referencePage
Spread
The reference object. Note: Required when the to value specifies before or after. Can accept: Page or Spread. (Optional)

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

Array of Page getElements ()
Resolves the object specifier, creating an array of object references.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

Page move ([to: LocationOptions=LocationOptions.AT_END][, reference: any][, binding: BindingOptions=BindingOptions.DEFAULT_VALUE])
Moves the page.

ParameterTypeDescription
toLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The new location of the page relative to the reference object or within the document or spread. (Optional) (default: LocationOptions.AT_END)
referencePage
Spread
The reference object. Note: Required when the to parameter value specifies before or after. Can accept: Page or Spread. (Optional)
bindingBindingOptions:
BindingOptions.RIGHT_ALIGN
BindingOptions.LEFT_ALIGN
BindingOptions.DEFAULT_VALUE
The location of the binding spine in spreads. (Optional) (default: BindingOptions.DEFAULT_VALUE)

Array of any place (fileName: File[, placePoint: Array of Measurement Unit (Number or String)][, destinationLayer: Layer][, showingOptions: bool=false][, autoflowing: bool=false][, withProperties: Object])
Places the file.

ParameterTypeDescription
fileNameFileThe file to place
placePoint Array of Measurement Unit (Number or String)The point at which to place (Optional)
destinationLayerLayerThe layer on which to place (Optional)
showingOptionsboolWhether to display the import options dialog (Optional) (default: false)
autoflowingboolWhether to autoflow placed text (Optional) (default: false)
withPropertiesObjectInitial values for properties of the placed object(s) (Optional)

PageItem placeXML (using: XMLElement, placePoint: Array of Measurement Unit (Number or String)[, autoflowing: bool=false])
Places the XML element onto a page. If the place point is above an existing page item, place the XML element into the page item.

ParameterTypeDescription
usingXMLElementThe XML element to place.
placePoint Array of Measurement Unit (Number or String)The point at which to place the object, specified in the format [x, y].
autoflowingboolIf true, autoflows placed text. (Optional) (default: false)

void remove ()
Deletes the Page.

void removeOverride ()
Removes the override from a previously overridden master page item.

PageItem setContent (using: string[, relativeBasePath: string])
Replaces the content of XML element with content imported from a file.

ParameterTypeDescription
usingstringThe file path to the import file.
relativeBasePathstringBase path used to resolve relative paths. (Optional)

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

string toSpecifier ()
Retrieves the object specifier.

Element of

Bookmark.destination

Button.parent

FormField.parent

HyperlinkPageDestination.destinationPage

LayoutWindow.activePage

MarginPreference.parent

PageItem.parent

Section.pageStart

Used in:

Bookmark Bookmarks.add (destination: any[, withProperties: Object])

PageItem Button.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void Button.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any Button.override (destinationPage: Page)

Button Buttons.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

PageItem EPS.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void EPS.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any EPS.override (destinationPage: Page)

PageItem FormField.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void FormField.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any FormField.override (destinationPage: Page)

PageItem Graphic.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void Graphic.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any Graphic.override (destinationPage: Page)

PageItem GraphicLine.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void GraphicLine.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any GraphicLine.override (destinationPage: Page)

GraphicLine GraphicLines.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

PageItem Group.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void Group.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any Group.override (destinationPage: Page)

Group Groups.add (groupItems: Array of PageItem[, layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

any Guide.override (destinationPage: Page)

HyperlinkExternalPageDestination HyperlinkExternalPageDestinations.add ([destination: Page][, withProperties: Object])

HyperlinkPageDestination HyperlinkPageDestinations.add ([destination: Page][, withProperties: Object])

PageItem Image.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void Image.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any Image.override (destinationPage: Page)

PageItem ImportedPage.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void ImportedPage.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any ImportedPage.override (destinationPage: Page)

array of Story Index.generate ([on: any][, placePoint: Array of Measurement Unit (Number or String)][, destinationLayer: Layer][, autoflowing: bool=false][, includeOverset: bool=false])

void Movie.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any Movie.override (destinationPage: Page)

Movie Movies.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

PageItem Oval.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void Oval.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any Oval.override (destinationPage: Page)

Oval Ovals.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

PageItem PDF.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void PDF.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any PDF.override (destinationPage: Page)

PageItem PICT.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void PICT.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any PICT.override (destinationPage: Page)

Page Page.duplicate ([to: LocationOptions=LocationOptions.AT_END][, reference: any])

Page Page.move ([to: LocationOptions=LocationOptions.AT_END][, reference: any][, binding: BindingOptions=BindingOptions.DEFAULT_VALUE])

PageItem PageItem.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void PageItem.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any PageItem.override (destinationPage: Page)

Page Pages.add ([at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

array of Page Pages.itemByRange (from: any, to: any)

Page Pages.nextItem (obj: Page)

Page Pages.previousItem (obj: Page)

PageItem Polygon.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void Polygon.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any Polygon.override (destinationPage: Page)

Polygon Polygons.add ([layer: Layer][, numberOfSides: number][, insetPercentage: number][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

PageItem Rectangle.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void Rectangle.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any Rectangle.override (destinationPage: Page)

Rectangle Rectangles.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

Section Sections.add ([reference: Page][, withProperties: Object])

void Sound.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any Sound.override (destinationPage: Page)

Sound Sounds.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

Spread Spread.move ([to: LocationOptions=LocationOptions.AT_END][, reference: any])

PageItem TextFrame.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void TextFrame.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any TextFrame.override (destinationPage: Page)

TextFrame TextFrames.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

PageItem WMF.duplicate ([to: any][, by: Array of Measurement Unit (Number or String)])

void WMF.move ([to: any][, by: Array of Measurement Unit (Number or String)])

any WMF.override (destinationPage: Page)

PageItem XMLElement.placeIntoCopy (on: any, placePoint: Array of Measurement Unit (Number or String), copyItem: PageItem[, retainExistingFrame: bool=false])

PageItem XMLElement.placeIntoFrame (on: any, geometricBounds: Array of Measurement Unit (Number or String))

Return

Page Page.duplicate ([to: LocationOptions=LocationOptions.AT_END][, reference: any])

Array of Page Page.getElements ()

Page Page.move ([to: LocationOptions=LocationOptions.AT_END][, reference: any][, binding: BindingOptions=BindingOptions.DEFAULT_VALUE])

Page Pages.add ([at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

Page Pages.anyItem ()

Array of Page Pages.everyItem ()

Page Pages.firstItem ()

Page Pages.item (index: any)

Page Pages.itemByID (id: number)

Page Pages.itemByName (name: string)

Array of Page Pages.itemByRange (from: any, to: any)

Page Pages.lastItem ()

Page Pages.middleItem ()

Page Pages.nextItem (obj: Page)

Page Pages.previousItem (obj: Page)

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