Skip to content

PageItem

app.activeDocument.pageItems[index]

Any art item. Every art item and group in a document is a page item. You may refer to a page item as an element of a document, layer, or group item.

The PageItem class gives you complete access to every art item contained in an Illustrator document. The PageItem class is the superclass of all artwork objects in a document. The CompoundPathItem, GroupItem, MeshItem, PathItem, PlacedItem, PluginItem, RasterItem, and TextFrameItem classes each inherit a set of properties from the PageItem class.

You cannot create a PageItem directly, you must create one of the specific PageItem subclasses, such as PathItem.


app.activeDocument.pageItems[index].artworkKnockout

Is this object used to create a knockout.

KnockoutState


app.activeDocument.pageItems[index].blendingMode

The mode to use when compositing this object. An object is considered composited when its opacity is set to less than 100.0 (100%).

BlendModes


app.activeDocument.pageItems[index].controlBounds

The bounds of the object including stroke width and controls.

Rect; read-only.


app.activeDocument.pageItems[index].editable

If true, this page item is editable.

Boolean; read-only.


app.activeDocument.pageItems[index].geometricBounds

The object’s bounds excluding the stroke width.

Array of 4 numbers; read-only.


app.activeDocument.pageItems[index].height

The height of the page item, calculated from the geometric bounds.

Range: 0.0 to 16348.0.

Number (double).


app.activeDocument.pageItems[index].hidden

If true, this page item is hidden.

Boolean.


app.activeDocument.pageItems[index].isIsolated

If true, this object is isolated.

Boolean.


app.activeDocument.pageItems[index].layer

The layer to which this page item belongs.

Layer; read-only.


app.activeDocument.pageItems[index].left

The left position of the art item.

Number (double).


app.activeDocument.pageItems[index].locked

If true, this page item is locked.

Boolean.


app.activeDocument.pageItems[index].name

The name of this page item.

String.


app.activeDocument.pageItems[index].note

The note assigned to this item.

String.


app.activeDocument.pageItems[index].opacity

The opacity of this object, where 100.0 is completely opaque and 0.0 is completely transparent.

Number (double).


app.activeDocument.pageItems[index].parent

The parent of this object.

Object; read-only.


app.activeDocument.pageItems[index].pixelAligned

True if this item is aligned to the pixel grid.

Boolean.


app.activeDocument.pageItems[index].position

The position (in points) of the top left corner of the item in the format {x, y}. Does not include stroke weight.

Array of 2 numbers.


app.activeDocument.pageItems[index].selected

If true, this object is selected.

Boolean.


app.activeDocument.pageItems[index].sliced

If true, preserve slices.

Boolean.


app.activeDocument.pageItems[index].tags

The collection of tags associated with this page item.

Tags


app.activeDocument.pageItems[index].top

The top position of the art item.

Number (double).


app.activeDocument.pageItems[index].typename

The class name of the object.

String; read-only.


app.activeDocument.pageItems[index].uRL

The value of the Adobe URL tag assigned to this page item.

String.


app.activeDocument.pageItems[index].uuid

The unique identifier for this pageItem

String; read-only.


app.activeDocument.pageItems[index].visibilityVariable

The visibility variable to which this page item path is bound.

Variable


app.activeDocument.pageItems[index].visibleBounds

The object’s visible bounds, including stroke width of any objects in the illustration.

Array of 4 numbers; read-only.


app.activeDocument.pageItems[index].width

The width of the page item, calculated from the geometric bounds.

Range: 0.0 to 16348.0.

Number (double).


app.activeDocument.pageItems[index].wrapInside

If true, the text frame object should be wrapped inside this object.

Boolean.


app.activeDocument.pageItems[index].wrapOffset

The offset to use when wrapping text around this object.

Number (double).


app.activeDocument.pageItems[index].wrapped

If true, wrap text frame objects around this object (text frame must be above the object).

Boolean.


app.activeDocument.pageItems[index].zOrderPosition

The drawing order of the art within its group or layer.

Number (long); read-only.


app.activeDocument.pageItems[index].bringInPerspective(posX, posY, perspectiveGridPlane)

Places art object(s) in a perspective grid at a specified position and grid plane.

ParameterTypeDescription
posXNumberX position to place art at
posYNumberY position to place art at
perspectiveGridPlanePerspectiveGridPlaneTypePerspective grid plane type to use

Returns.


app.activeDocument.pageItems[index].resize(
scaleX,
scaleY
[,changePositions]
[,changeFillPatterns]
[,changeFillGradients]
[,changeStrokePattern]
[,changeLineWidths]
[,scaleAbout]
)

Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 = 100%.

ParameterTypeDescription
scaleXNumber (double)Horizontal scaling factor
scaleYNumber (double)Vertical scaling factor
changePositionsBoolean, optionalWhether to effect art object positions and orientations
changeFillPatternsBoolean, optionalWhether to transform fill patterns
changeFillGradientsBoolean, optionalWhether to transform fill gradients
changeStrokePatternBoolean, optionalWhether to transform stroke patterns
changeLineWidthsNumber (double), optionalThe amount to scale line widths
scaleAboutTransformation, optionalThe point to use as anchor, to transform about

Nothing.


app.activeDocument.pageItems[index].rotate(
angle
[,changePositions]
[,changeFillPatterns]
[,changeFillGradients]
[,changeStrokePattern]
[,rotateAbout]
)

Rotates the art item relative to the current rotation. The object is rotated counter-clockwise if the angle value is positive, clockwise if the value is negative.

ParameterTypeDescription
angleNumber (double)The angle amount to rotate the element
changePositionsBoolean, optionalWhether to effect art object positions and orientations
changeFillPatternsBoolean, optionalWhether to transform fill patterns
changeFillGradientsBoolean, optionalWhether to transform fill gradients
changeStrokePatternBoolean, optionalWhether to transform stroke patterns
rotateAboutTransformation, optionalThe point to use as anchor, to transform about

Nothing.


app.activeDocument.pageItems[index].transform(
transformationMatrix
[,changePositions]
[,changeFillPatterns]
[,changeFillGradients]
[,changeStrokePattern]
[,changeLineWidths]
[,transformAbout]
)

Transforms the art item by applying a transformation matrix.

ParameterTypeDescription
transformationMatrixMatrixTransformation matrix to apply
changePositionsBoolean, optionalWhether to change Positions
changeFillPatternsBoolean, optionalWhether to change Fill Patterns
changeFillGradientsBoolean, optionalWhether to change Fill Gradients
changeStrokePatternBoolean, optionalWhether to change Stroke Pattern
changeLineWidthsNumber (double), optionalThe amount to scale line widths
transformAboutTransformation, optionalThe point to use as anchor, to transform about

Nothing.


app.activeDocument.pageItems[index].translate(
deltaX
[,deltaY]
[,transformObjects]
[,transformFillPatterns]
[,transformFillGradients]
[,transformStrokePatterns]
)

Repositions the art item relative to the current position, where deltaX is the horizontal offset and deltaY is the vertical offset.

ParameterTypeDescription
deltaXNumber (double), optionalHorizontal offset
deltaYNumber (double), optionalVertical offset
transformObjectsBoolean, optionalWhether to transform Objects
transformFillPatternsBoolean, optionalWhether to transform Fill Patterns
transformFillGradientsBoolean, optionalWhether to transform Fill Gradients
transformStrokePatternsBoolean, optionalWhether to transform Stroke Patterns

Nothing.


app.activeDocument.pageItems[index].zOrder(zOrderCmd)

Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.

ParameterTypeDescription
zOrderCmdZOrderMethodStacking order arrangement method

Nothing.