Adobe InDesign CS (3.0) Object Model JS: MasterSpread

InDesign CS

Class

MasterSpread

 A master spread.

QuickLinks

createGuides, duplicate, extractLabel, insertLabel, place, remove

Hierarchy

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

Properties

PropertyTypeAccessDescription
allGraphics Array of Graphic readonlyLists all graphics contained by the MasterSpread.
allPageItems Array 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.
indexnumber readonlyThe index of the MasterSpread within its containing object.
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 a spread

ParameterTypeDescription
numberOfRowsnumberNumber of rows of guides on a page (Optional) (default: 0)
numberOfColumnsnumberNumber of columns of guides on a page (Optional) (default: 0)
rowGutterMeasurement Unit (Number or String)The amount of gutter between rows (Optional) (default: 0)
columnGutterMeasurement Unit (Number or String)The amount of gutter between columns (Optional) (default: 0)
guideColor Array of 3 Reals (0 - 255)
UIColors
The guide's color. Can accept: Array of 3 Reals (0 - 255) or UIColors enumerator. (Optional)
fitMarginsboolWhether the guides should fit to margins or fit to page (Optional) (default: false)
removeExistingboolWhether to remove existing guides (Optional) (default: false)
layerLayerThe layer on which to create the MasterSpread (Optional)

MasterSpread duplicate ()
Duplicates the MasterSpread.

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

ParameterTypeDescription
keystringThe key.

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

ParameterTypeDescription
keystringThe key.
valuestringThe value.

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

ParameterTypeDescription
fileNameFileThe file to place.
placePoint Array of Measurement Unit (Number or String)The point where to place the object (only applicable if you are telling a page or spread to place) (Optional)
destinationLayer Array of Layers
Layer
The layer(s) to place the file on (only valid if you are telling a page or spread to place). Can accept: Layer or Array of Layers. (Optional)
showingOptionsboolWhether to display the import options dialog (Optional) (default: false)
autoflowingboolWhether to autoflow placed text (Optional) (default: false)
retainingFormattingboolWhether to keep formatting of placed text files (Optional) (default: true)
convertingQuotesboolWhether to convert to typographer's quotes (Optional) (default: true)
withPropertiesObjectInitial values for properties of the placed object(s) (Optional)

void remove ()
Deletes the MasterSpread.

Element of

Guide.parent

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

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

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

Return

MasterSpread MasterSpread.duplicate ()

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

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