PageItem
PageItem
Section titled “PageItem”app.activeDocument.pageItems[index]
Description
Section titled “Description”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.
Properties
Section titled “Properties”PageItem.artworkKnockout
Section titled “PageItem.artworkKnockout”app.activeDocument.pageItems[index].artworkKnockout
Description
Section titled “Description”Is this object used to create a knockout.
PageItem.blendingMode
Section titled “PageItem.blendingMode”app.activeDocument.pageItems[index].blendingMode
Description
Section titled “Description”The mode to use when compositing this object. An object is considered composited when its opacity is set to less than 100.0 (100%).
PageItem.controlBounds
Section titled “PageItem.controlBounds”app.activeDocument.pageItems[index].controlBounds
Description
Section titled “Description”The bounds of the object including stroke width and controls.
Rect; read-only.
PageItem.editable
Section titled “PageItem.editable”app.activeDocument.pageItems[index].editable
Description
Section titled “Description”If true
, this page item is editable.
Boolean; read-only.
PageItem.geometricBounds
Section titled “PageItem.geometricBounds”app.activeDocument.pageItems[index].geometricBounds
Description
Section titled “Description”The object’s bounds excluding the stroke width.
Array of 4 numbers; read-only.
PageItem.height
Section titled “PageItem.height”app.activeDocument.pageItems[index].height
Description
Section titled “Description”The height of the page item, calculated from the geometric bounds.
Range: 0.0 to 16348.0.
Number (double).
PageItem.hidden
Section titled “PageItem.hidden”app.activeDocument.pageItems[index].hidden
Description
Section titled “Description”If true
, this page item is hidden.
Boolean.
PageItem.isIsolated
Section titled “PageItem.isIsolated”app.activeDocument.pageItems[index].isIsolated
Description
Section titled “Description”If true
, this object is isolated.
Boolean.
PageItem.layer
Section titled “PageItem.layer”app.activeDocument.pageItems[index].layer
Description
Section titled “Description”The layer to which this page item belongs.
Layer; read-only.
PageItem.left
Section titled “PageItem.left”app.activeDocument.pageItems[index].left
Description
Section titled “Description”The left position of the art item.
Number (double).
PageItem.locked
Section titled “PageItem.locked”app.activeDocument.pageItems[index].locked
Description
Section titled “Description”If true
, this page item is locked.
Boolean.
PageItem.name
Section titled “PageItem.name”app.activeDocument.pageItems[index].name
Description
Section titled “Description”The name of this page item.
String.
PageItem.note
Section titled “PageItem.note”app.activeDocument.pageItems[index].note
Description
Section titled “Description”The note assigned to this item.
String.
PageItem.opacity
Section titled “PageItem.opacity”app.activeDocument.pageItems[index].opacity
Description
Section titled “Description”The opacity of this object, where 100.0 is completely opaque and 0.0 is completely transparent.
Number (double).
PageItem.parent
Section titled “PageItem.parent”app.activeDocument.pageItems[index].parent
Description
Section titled “Description”The parent of this object.
Object; read-only.
PageItem.pixelAligned
Section titled “PageItem.pixelAligned”app.activeDocument.pageItems[index].pixelAligned
Description
Section titled “Description”True
if this item is aligned to the pixel grid.
Boolean.
PageItem.position
Section titled “PageItem.position”app.activeDocument.pageItems[index].position
Description
Section titled “Description”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.
PageItem.selected
Section titled “PageItem.selected”app.activeDocument.pageItems[index].selected
Description
Section titled “Description”If true
, this object is selected.
Boolean.
PageItem.sliced
Section titled “PageItem.sliced”app.activeDocument.pageItems[index].sliced
Description
Section titled “Description”If true
, preserve slices.
Boolean.
PageItem.tags
Section titled “PageItem.tags”app.activeDocument.pageItems[index].tags
Description
Section titled “Description”The collection of tags associated with this page item.
PageItem.top
Section titled “PageItem.top”app.activeDocument.pageItems[index].top
Description
Section titled “Description”The top position of the art item.
Number (double).
PageItem.typename
Section titled “PageItem.typename”app.activeDocument.pageItems[index].typename
Description
Section titled “Description”The class name of the object.
String; read-only.
PageItem.uRL
Section titled “PageItem.uRL”app.activeDocument.pageItems[index].uRL
Description
Section titled “Description”The value of the Adobe URL tag assigned to this page item.
String.
PageItem.uuid
Section titled “PageItem.uuid”app.activeDocument.pageItems[index].uuid
Description
Section titled “Description”The unique identifier for this pageItem
String; read-only.
PageItem.visibilityVariable
Section titled “PageItem.visibilityVariable”app.activeDocument.pageItems[index].visibilityVariable
Description
Section titled “Description”The visibility variable to which this page item path is bound.
PageItem.visibleBounds
Section titled “PageItem.visibleBounds”app.activeDocument.pageItems[index].visibleBounds
Description
Section titled “Description”The object’s visible bounds, including stroke width of any objects in the illustration.
Array of 4 numbers; read-only.
PageItem.width
Section titled “PageItem.width”app.activeDocument.pageItems[index].width
Description
Section titled “Description”The width of the page item, calculated from the geometric bounds.
Range: 0.0 to 16348.0.
Number (double).
PageItem.wrapInside
Section titled “PageItem.wrapInside”app.activeDocument.pageItems[index].wrapInside
Description
Section titled “Description”If true
, the text frame object should be wrapped inside this object.
Boolean.
PageItem.wrapOffset
Section titled “PageItem.wrapOffset”app.activeDocument.pageItems[index].wrapOffset
Description
Section titled “Description”The offset to use when wrapping text around this object.
Number (double).
PageItem.wrapped
Section titled “PageItem.wrapped”app.activeDocument.pageItems[index].wrapped
Description
Section titled “Description”If true
, wrap text frame objects around this object (text frame must be above the object).
Boolean.
PageItem.zOrderPosition
Section titled “PageItem.zOrderPosition”app.activeDocument.pageItems[index].zOrderPosition
Description
Section titled “Description”The drawing order of the art within its group or layer.
Number (long); read-only.
Methods
Section titled “Methods”PageItem.bringInPerspective()
Section titled “PageItem.bringInPerspective()”app.activeDocument.pageItems[index].bringInPerspective(posX, posY, perspectiveGridPlane)
Description
Section titled “Description”Places art object(s) in a perspective grid at a specified position and grid plane.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
posX | Number | X position to place art at |
posY | Number | Y position to place art at |
perspectiveGridPlane | PerspectiveGridPlaneType | Perspective grid plane type to use |
Returns
Section titled “Returns”Returns.
PageItem.resize()
Section titled “PageItem.resize()”app.activeDocument.pageItems[index].resize( scaleX, scaleY [,changePositions] [,changeFillPatterns] [,changeFillGradients] [,changeStrokePattern] [,changeLineWidths] [,scaleAbout])
Description
Section titled “Description”Scales the art item where scaleX
is the horizontal scaling factor and scaleY
is the vertical scaling factor. 100.0 = 100%.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
scaleX | Number (double) | Horizontal scaling factor |
scaleY | Number (double) | Vertical scaling factor |
changePositions | Boolean, optional | Whether to effect art object positions and orientations |
changeFillPatterns | Boolean, optional | Whether to transform fill patterns |
changeFillGradients | Boolean, optional | Whether to transform fill gradients |
changeStrokePattern | Boolean, optional | Whether to transform stroke patterns |
changeLineWidths | Number (double), optional | The amount to scale line widths |
scaleAbout | Transformation, optional | The point to use as anchor, to transform about |
Returns
Section titled “Returns”Nothing.
PageItem.rotate()
Section titled “PageItem.rotate()”app.activeDocument.pageItems[index].rotate( angle [,changePositions] [,changeFillPatterns] [,changeFillGradients] [,changeStrokePattern] [,rotateAbout])
Description
Section titled “Description”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.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
angle | Number (double) | The angle amount to rotate the element |
changePositions | Boolean, optional | Whether to effect art object positions and orientations |
changeFillPatterns | Boolean, optional | Whether to transform fill patterns |
changeFillGradients | Boolean, optional | Whether to transform fill gradients |
changeStrokePattern | Boolean, optional | Whether to transform stroke patterns |
rotateAbout | Transformation, optional | The point to use as anchor, to transform about |
Returns
Section titled “Returns”Nothing.
PageItem.transform()
Section titled “PageItem.transform()”app.activeDocument.pageItems[index].transform( transformationMatrix [,changePositions] [,changeFillPatterns] [,changeFillGradients] [,changeStrokePattern] [,changeLineWidths] [,transformAbout])
Description
Section titled “Description”Transforms the art item by applying a transformation matrix.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
transformationMatrix | Matrix | Transformation matrix to apply |
changePositions | Boolean, optional | Whether to change Positions |
changeFillPatterns | Boolean, optional | Whether to change Fill Patterns |
changeFillGradients | Boolean, optional | Whether to change Fill Gradients |
changeStrokePattern | Boolean, optional | Whether to change Stroke Pattern |
changeLineWidths | Number (double), optional | The amount to scale line widths |
transformAbout | Transformation, optional | The point to use as anchor, to transform about |
Returns
Section titled “Returns”Nothing.
PageItem.translate()
Section titled “PageItem.translate()”app.activeDocument.pageItems[index].translate( deltaX [,deltaY] [,transformObjects] [,transformFillPatterns] [,transformFillGradients] [,transformStrokePatterns])
Description
Section titled “Description”Repositions the art item relative to the current position, where deltaX
is the horizontal offset and deltaY
is the vertical offset.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
deltaX | Number (double), optional | Horizontal offset |
deltaY | Number (double), optional | Vertical offset |
transformObjects | Boolean, optional | Whether to transform Objects |
transformFillPatterns | Boolean, optional | Whether to transform Fill Patterns |
transformFillGradients | Boolean, optional | Whether to transform Fill Gradients |
transformStrokePatterns | Boolean, optional | Whether to transform Stroke Patterns |
Returns
Section titled “Returns”Nothing.
PageItem.zOrder()
Section titled “PageItem.zOrder()”app.activeDocument.pageItems[index].zOrder(zOrderCmd)
Description
Section titled “Description”Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
zOrderCmd | ZOrderMethod | Stacking order arrangement method |
Returns
Section titled “Returns”Nothing.