Adobe InDesign CS4 (6.0) Object Model JS: Spread

InDesign CS4

Class

Spread

 A spread.

QuickLinks

createGuides, detach, duplicate, extractLabel, getElements, insertLabel, move, place, placeXML, remove, removeOverride, resolve, setContent, toSource, toSpecifier, transform, transformValuesOf

Hierarchy

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

Properties

PropertyTypeAccessDescription
allGraphicsArray of Graphic readonlyLists all graphics contained by the Spread.
allPageItemsArray of PageItem readonlyLists all page items contained by the Spread.
allowPageShufflebool r/wIf true, guarantees that when pages are added to a spread it will contain a maximum of two pages. If false, allows pages to be added or moved into existing spreads. For override information, see preserve layout when shuffling.
appliedMasterMasterSpreadNothingEnum r/wThe master spread applied to the Spread. Can also accept: NothingEnum enumerator.
buttonsButtons readonlyA collection of buttons.
flattenerOverrideSpreadFlattenerLevel:
SpreadFlattenerLevel.DEFAULT_VALUE
SpreadFlattenerLevel.NONE
SpreadFlattenerLevel.CUSTOM
r/wThe transparency flattener preferences override for the spread.
flattenerPreferencesFlattenerPreference readonlyFlattener preference settings.
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 Spread.
idmlComponentNamestring r/wThe IDML component name of the Spread.
indexnumber readonlyThe index of the Spread 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.
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.
pageTransitionDirectionPageTransitionDirectionOptions:
PageTransitionDirectionOptions.NOT_APPLICABLE
PageTransitionDirectionOptions.DOWN
PageTransitionDirectionOptions.RIGHT_TO_LEFT
PageTransitionDirectionOptions.LEFT_DOWN
PageTransitionDirectionOptions.LEFT_UP
PageTransitionDirectionOptions.LEFT_TO_RIGHT
PageTransitionDirectionOptions.RIGHT_DOWN
PageTransitionDirectionOptions.RIGHT_UP
PageTransitionDirectionOptions.UP
PageTransitionDirectionOptions.IN
PageTransitionDirectionOptions.OUT
PageTransitionDirectionOptions.HORIZONTAL
PageTransitionDirectionOptions.VERTICAL
PageTransitionDirectionOptions.HORIZONTAL_IN
PageTransitionDirectionOptions.HORIZONTAL_OUT
PageTransitionDirectionOptions.VERTICAL_IN
PageTransitionDirectionOptions.VERTICAL_OUT
r/wThe direction of the page transition.
pageTransitionDurationPageTransitionDurationOptions:
PageTransitionDurationOptions.FAST
PageTransitionDurationOptions.MEDIUM
PageTransitionDurationOptions.SLOW
r/wThe duration of the page transition.
pageTransitionTypePageTransitionTypeOptions:
PageTransitionTypeOptions.NONE
PageTransitionTypeOptions.BLINDS_TRANSITION
PageTransitionTypeOptions.BOX_TRANSITION
PageTransitionTypeOptions.COMB_TRANSITION
PageTransitionTypeOptions.COVER_TRANSITION
PageTransitionTypeOptions.DISSOLVE_TRANSITION
PageTransitionTypeOptions.FADE_TRANSITION
PageTransitionTypeOptions.PAGE_TURN_TRANSITION
PageTransitionTypeOptions.PUSH_TRANSITION
PageTransitionTypeOptions.SPLIT_TRANSITION
PageTransitionTypeOptions.UNCOVER_TRANSITION
PageTransitionTypeOptions.WIPE_TRANSITION
PageTransitionTypeOptions.ZOOM_IN_TRANSITION
PageTransitionTypeOptions.ZOOM_OUT_TRANSITION
r/wThe type of page transition.
pagesPages readonlyA collection of pages.
parentDocument readonlyThe parent of the Spread (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
Spread
The reference object. Note: Required only when the to parameter specifies before or after. Can accept: Spread, Document or MasterSpread. (Optional)

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

ParameterTypeDescription
keystringThe key.

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

Spread move ([to: LocationOptions=LocationOptions.AT_END][, reference: any])
Moves 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
Page
Spread
The reference object. Note: Required when the to parameter specifies before or after. Can accept: Spread, Page or Document. (Optional)

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)

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.
placePointArray 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 Spread.

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

any resolve (location: any, in: CoordinateSpaces[, consideringRulerUnits: bool=false])
Get the coordinates of the given location in the specified coordinate system.

ParameterTypeDescription
locationAnchorPoint
AnchorPoint
Array of 2 Reals
Array of Arrays of 2 Reals
BoundingBoxLimits
CoordinateSpaces
Long Integers
The location requested. Can accept: Array of 2 Reals, AnchorPoint enumerator or Array of Arrays of 2 Reals, CoordinateSpaces enumerators, AnchorPoint enumerators, BoundingBoxLimits enumerators or Long Integers.
inCoordinateSpaces:
CoordinateSpaces.PASTEBOARD_COORDINATES
CoordinateSpaces.PARENT_COORDINATES
CoordinateSpaces.INNER_COORDINATES
CoordinateSpaces.SPREAD_COORDINATES
The coordinate space to use.
consideringRulerUnitsboolIf true then a ruler location is interpreted using ruler units rather than points. The default value is false. This parameter has no effect unless the reference point is specified relative to a page. (Optional) (default: false)

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 Spread.

string toSpecifier ()
Retrieves the object specifier.

void transform (in: CoordinateSpaces, from: any, withMatrix: any[, replacingCurrent: any][, consideringRulerUnits: bool=false])
Transform the page item.

ParameterTypeDescription
inCoordinateSpaces:
CoordinateSpaces.PASTEBOARD_COORDINATES
CoordinateSpaces.PARENT_COORDINATES
CoordinateSpaces.INNER_COORDINATES
CoordinateSpaces.SPREAD_COORDINATES
The coordinate space to use
fromAnchorPoint
AnchorPoint
Array of 2 Reals
Array of Arrays of 2 Reals
BoundingBoxLimits
CoordinateSpaces
Long Integers
The temporary origin during the transformation. Can accept: Array of 2 Reals, AnchorPoint enumerator or Array of Arrays of 2 Reals, CoordinateSpaces enumerators, AnchorPoint enumerators, BoundingBoxLimits enumerators or Long Integers.
withMatrixArray of 6 Reals
TransformationMatrix
Transform matrix. Can accept: Array of 6 Reals or TransformationMatrix.
replacingCurrentArray of MatrixContent
Long Integer
MatrixContent
Transform components to consider; providing this optional parameter causes the target's existing transform components to be replaced with new values. Without this parameter, the given matrix is concatenated onto the target's existing transform combining the effect of the two. Can accept: MatrixContent enumerator, Array of MatrixContent enumerators or Long Integer. (Optional)
consideringRulerUnitsboolIf true then a ruler based origin is interpreted using ruler units rather than points. The default value is false. This parameter has no effect unless the reference point is specified relative to a page. (Optional) (default: false)

Array of TransformationMatrix transformValuesOf (in: CoordinateSpaces)
Get the transformation values of the page item.

ParameterTypeDescription
inCoordinateSpaces:
CoordinateSpaces.PASTEBOARD_COORDINATES
CoordinateSpaces.PARENT_COORDINATES
CoordinateSpaces.INNER_COORDINATES
CoordinateSpaces.SPREAD_COORDINATES
The coordinate space to use

Element of

FlattenerPreference.parent

LayoutWindow.activeSpread

Page.parent

Used in:

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

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

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

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

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

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

Group Groups.add (groupItems: Array of PageItem[, layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, 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)])

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

array of Spread Spreads.itemByRange (from: any, to: any)

Spread Spreads.nextItem (obj: Spread)

Spread Spreads.previousItem (obj: Spread)

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

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

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 Spread Spread.getElements ()

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

Spread Spreads.[] (index: number)

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

Spread Spreads.anyItem ()

Array of Spread Spreads.everyItem ()

Spread Spreads.firstItem ()

Spread Spreads.item (index: any)

Spread Spreads.itemByID (id: number)

Spread Spreads.itemByName (name: string)

Array of Spread Spreads.itemByRange (from: any, to: any)

Spread Spreads.lastItem ()

Spread Spreads.middleItem ()

Spread Spreads.nextItem (obj: Spread)

Spread Spreads.previousItem (obj: Spread)

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