Illustrator JavaScript Object Model Quick Reference

April 28, 2026 · View on GitHub

Containment Hierarchy

Application (app)
 └─ Document
     ├─ Layer
     │   ├─ pathItems[]        → PathItem → PathPoint[]
     │   ├─ compoundPathItems[] → CompoundPathItem
     │   ├─ textFrames[]       → TextFrame
     │   │   ├─ characters[]   → TextRange (single char)
     │   │   ├─ words[]        → TextRange (word)
     │   │   ├─ paragraphs[]   → TextRange (paragraph)
     │   │   ├─ lines[]        → TextRange (line)
     │   │   └─ insertionPoints[]
     │   ├─ placedItems[]      → PlacedItem
     │   ├─ rasterItems[]      → RasterItem
     │   ├─ meshItems[]        → MeshItem
     │   ├─ pluginItems[]      → PluginItem
     │   ├─ graphItems[]       → GraphItem
     │   ├─ symbolItems[]      → SymbolItem → Symbol
     │   ├─ groupItems[]       → GroupItem (recursive pageItems)
     │   ├─ nonNativeItems[]   → NonNativeItem
     │   └─ legacyTextItems[]  → LegacyTextItem
     ├─ Artboard[]
     ├─ Swatch[] / Spot[] / Gradient[] / Pattern[]
     ├─ GraphicStyle[] / Brush[] / Symbol[]
     ├─ Story[]
     ├─ CharacterStyle[] / ParagraphStyle[]
     ├─ Variable[] / Dataset[]
     └─ View[]

Artwork Item Types (pageItems members)

TypetypenameCollectionNotes
PathPathItempathItemsLines, shapes, freeform paths
Compound pathCompoundPathItemcompoundPathItemsMultiple paths combined
GroupGroupItemgroupItemsContains nested pageItems
Text frameTextFrametextFramesPoint, area, or path text
Placed imagePlacedItemplacedItemsLinked external files
Raster imageRasterItemrasterItemsEmbedded bitmaps
MeshMeshItemmeshItemsGradient mesh objects
GraphGraphItemgraphItemsChart/graph objects
Plugin itemPluginItempluginItemsPlugin-generated art
Symbol instanceSymbolItemsymbolItemsInstance of a Symbol
Non-nativeNonNativeItemnonNativeItemsForeign objects
Legacy textLegacyTextItemlegacyTextItemsPre-CS text objects

Color Object Types

ObjectColor SpaceValue RangeNotes
RGBColorRGB0-255 per channel.red, .green, .blue
CMYKColorCMYK0-100 per channel.cyan, .magenta, .yellow, .black
GrayColorGrayscale0-100.gray (0=black, 100=white)
LabColorLabL: 0-100, a/b: -128 to 127.l, .a, .b
SpotColorSpottint 0-100.spot, .tint
PatternColorPattern-.pattern, .matrix
GradientColorGradient-.gradient, .origin, .angle
NoColorNone-Transparent/no fill

Common Scripting Constants

Document and Color

  • DocumentColorSpace.RGB / .CMYK

Text

  • Justification.LEFT / .CENTER / .RIGHT / .FULLJUSTIFY / .FULLJUSTIFYLASTLINELEFT / .FULLJUSTIFYLASTLINECENTER / .FULLJUSTIFYLASTLINERIGHT
  • TextType.POINTTEXT / .AREATEXT / .PATHTEXT
  • FontBaselineOption.NORMALBASELINE / .SUPERSCRIPT / .SUBSCRIPT

Paths

  • PointType.SMOOTH / .CORNER
  • StrokeCap.BUTTENDCAP / .ROUNDENDCAP / .PROJECTINGENDCAP
  • StrokeJoin.MITERENDJOIN / .ROUNDENDJOIN / .BEVELENDJOIN

Transformations

  • Transformation.DOCUMENTORIGIN / .BOTTOM / .BOTTOMLEFT / .BOTTOMRIGHT / .CENTER / .LEFT / .RIGHT / .TOP / .TOPLEFT / .TOPRIGHT

Blend Modes

  • BlendModes.NORMAL / .MULTIPLY / .SCREEN / .OVERLAY / .SOFTLIGHT / .HARDLIGHT / .COLORDODGE / .COLORBURN / .DARKEN / .LIGHTEN / .DIFFERENCE / .EXCLUSION / .HUE / .SATURATIONBLEND / .COLORBLEND / .LUMINOSITY

Element Placement

  • ElementPlacement.PLACEATBEGINNING / .PLACEATEND / .PLACEBEFORE / .PLACEAFTER / .INSIDE

Z-Order

  • ZOrderMethod.BRINGTOFRONT / .SENDTOBACK / .BRINGFORWARD / .SENDBACKWARD

Save/Export

  • SaveOptions.SAVECHANGES / .DONOTSAVECHANGES / .PROMPTTOSAVECHANGES
  • ExportType.PNG24 / .PNG8 / .JPEG / .SVG / .TIFF / .PHOTOSHOP / .AUTOCAD / .FLASH / .GIF
  • Compatibility.ILLUSTRATOR8 through .ILLUSTRATOR24
  • PDFCompatibility.ACROBAT4 through .ACROBAT8

Gradient

  • GradientType.LINEAR / .RADIAL

Variables

  • VariableKind.TEXTUAL / .IMAGE / .VISIBILITY / .GRAPH

User Interaction

  • UserInteractionLevel.DISPLAYALERTS / .DONTDISPLAYALERTS

Print

  • PrintArtworkDesignation.ALLLAYERS / .VISIBLELAYERS / .VISIBLEPRINTABLELAYERS

Unit Conversions

FromTo PointsFormula
InchesPointsinches * 72
CentimetersPointscm * 28.346
MillimetersPointsmm * 2.834645
PicasPointspicas * 12
Em unitsPoints(emUnits * fontSize) / 1000