Adobe InDesign CS4 (6.0) Object Model JS: MasterSpread

InDesign CS4

Class

MasterSpread

 A master spread.

QuickLinks

createGuides, detach, duplicate, extractLabel, getElements, insertLabel, place, remove, removeOverride, toSource, toSpecifier

Hierarchy

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

Properties

PropertyTypeAccessDescription
allGraphicsArray of Graphic readonlyLists all graphics contained by the MasterSpread.
allPageItemsArray of PageItem readonlyLists all page items contained by the MasterSpread.
appliedMasterMasterSpreadNothingEnum r/wThe master spread applied to the MasterSpread. Can also accept: NothingEnum enumerator.
baseNamestring r/wThe name of the master spread.
buttonsButtons readonlyA collection of buttons.
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 MasterSpread.
idmlComponentNamestring r/wThe IDML component name of the MasterSpread.
indexnumber readonlyThe index of the MasterSpread within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
namestring readonlyThe name of the MasterSpread.
namePrefixstring r/wThe prefix of the master spread name.
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.
pagesPages readonlyA collection of pages.
parentDocument readonlyThe parent of the MasterSpread (a 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.
showMasterItemsbool r/wIf true, displays master page items on document pages in the spread.
textFramesTextFrames readonlyA collection of text frames.

Methods

Instances

void createGuides ([numberOfRows: number=0][, numberOfColumns: number=0][, rowGutter: Measurement Unit (Number or String)=0][, columnGutter: Measurement Unit (Number or String)=0][, guideColor: any][, fitMargins: bool=false][, removeExisting: bool=false][, layer: Layer])
Creates multiple guides on all pages of the spread.

ParameterTypeDescription
numberOfRowsnumber (range: 0 - 40)The number of rows to create on each page. (Optional) (default: 0)
numberOfColumnsnumber (range: 0 - 40)The number of columns to create on each page. (Optional) (default: 0)
rowGutterMeasurement Unit (Number or String) (range: 0 - 1440)The height of the gutter between rows. (Optional) (default: 0)
columnGutterMeasurement Unit (Number or String) (range: 0 - 1440)The width of the gutter between columns. (Optional) (default: 0)
guideColorArray of 3 Reals (0 - 255)
UIColors
The color to make the guides, specified either as an array of three doubles, each in the range 0 to 255 and representing R, G, and B values, or as a UI color. Can accept: Array of 3 Reals (0 - 255) or UIColors enumerator. (Optional)
fitMarginsboolIf true, the row height and column width are calculated based on the space within the page margins. If false, row height and column width are calculated based on the full page. (Optional) (default: false)
removeExistingboolIf true, removes existing guides when creating new ones. (Optional) (default: false)
layerLayerThe layer on which to create the guides. (Optional)

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

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

ParameterTypeDescription
toLocationOptions:
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.AT_END)
referenceDocument
MasterSpread
MasterSpread
The reference object. Note: Required only when the to parameter specifies before or after. Can accept: MasterSpread, Document or MasterSpread. (Optional)

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

ParameterTypeDescription
keystringThe key.

Array of MasterSpread 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.

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
placePointArray 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)

void remove ()
Deletes the MasterSpread.

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

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

string toSpecifier ()
Retrieves the object specifier.

Element of

LayoutWindow.activeSpread

MasterSpread.appliedMaster

Page.appliedMaster

Page.parent

Spread.appliedMaster

Used in:

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

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

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

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

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

array of MasterSpread MasterSpreads.itemByRange (from: any, to: any)

MasterSpread MasterSpreads.nextItem (obj: MasterSpread)

MasterSpread MasterSpreads.previousItem (obj: MasterSpread)

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

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

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

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

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

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

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

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

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

Array of MasterSpread MasterSpread.getElements ()

MasterSpread MasterSpreads.[] (index: number)

MasterSpread MasterSpreads.add ([pagesPerSpread: number][, withProperties: Object])

MasterSpread MasterSpreads.anyItem ()

Array of MasterSpread MasterSpreads.everyItem ()

MasterSpread MasterSpreads.firstItem ()

MasterSpread MasterSpreads.item (index: any)

MasterSpread MasterSpreads.itemByID (id: number)

MasterSpread MasterSpreads.itemByName (name: string)

Array of MasterSpread MasterSpreads.itemByRange (from: any, to: any)

MasterSpread MasterSpreads.lastItem ()

MasterSpread MasterSpreads.middleItem ()

MasterSpread MasterSpreads.nextItem (obj: MasterSpread)

MasterSpread MasterSpreads.previousItem (obj: MasterSpread)

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