EasyManua.ls Logo

Adobe 0046100128056 - InDesign - Mac - Working with Layers; Understanding the Layer Object Model

Adobe 0046100128056 - InDesign - Mac
209 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
50
4
Working with Layers
InDesigns layers are the key to controlling the stacking order of objects in your layout. You can think of
layers as transparent planes stacked on top of each other. You also can use layers as an organizational tool,
putting one type of content on a given layer or set of layers.
A document can contain one or more layers, and each document includes at least one layer. Layers are
document wide, not bound to specific pages or spreads.
This chapter covers scripting techniques related to layers in an InDesign layout and discusses common
operations involving layers.
Understanding the Layer Object Model
The following figure shows the layer object model. Note the following about the diagram:
X It focuses on the location of a layer and its contents in the context of the object hierarchy of a
document; it does not attempt to show all the other ways a script might work with the content of a
layer (e.g., you can get a reference to a text-frame object from a story, text object, page, or spread, in
addition to finding it inside a layer object).
X It uses the JavaScript form of the object names; however, the object hierarchy is the same in all
scripting languages.
X The basic properties of a layer are shown in the column at the left of the figure; the objects that may
be contained by the layer object, at the right.
It is important to note the distinction between the page-items collection and the allPageItems
collection. The former is a collection containing only the top-level page items in a layer. If a page item is
inside a group, for example, it will not appear in the
pageItems collection. In contrast, the allPageItems
collection is a flattened collection of all page items assigned to the layer, regardless of their location in the
object hierarchy. A page item inside a group on the layer would appear in the
allPageItems collection.
Similarly, the
allGraphics property contains all graphics stored in page items assigned to the layer,
regardless of their location in the object hierarchy.

Table of Contents

Related product manuals