The script of a PostScript-based Illustrator file is written in short operators that
Illustrator’s procsets define. Operands come first, as in PostScript. This page lists
every operator in Adobe’s “Adobe Illustrator File Format Specification” (23 February
1998), which covers Illustrator up to 7.0; the version given is the one that introduced
the operator where the specification marks it. The header comments and setup-section
operators (TE, TZ, Bn, Bd,
%_Bs, %_Br, BD, E, Pb…)
are explained on the prolog, setup and trailer
page. Paint and text attributes are modal: once set they stay until changed, and
Illustrator writes them only when they change.
%AI5_BeginLayer
1 1 1 1 0 0 1 255 79 79 Lb
(Layer 2) Ln
0 A
0 O
800 Ar
0 J 0 j 1 w 4 M []0 d
%AI3_Note:
0 D
0 XR
268 631 m
268 649 L
245 649 L
245 631 L
268 631 L
Bb
1 (Purple, Red & Yellow) 244.5 640 0 24 1 0 0 1 0 0 Bg
12064.0001 0 0 -22 -11819.5001 651 Bc
12 0 0 -22 244.5 651 Bm
12 0 0 -22 256.5 651 Bm
12064.0001 0 0 -22 268.5 651 Bc
f
0 BB
LB
%AI5_EndLayer--
Objects
An object is, optionally after A, a path, a path mask, a group, masked
group, compound path, compound path mask or wraparound group, a raster image, a text
object, placed art, a subscriber object or a graph, optionally followed by an
XT tag. Later objects paint over earlier ones.
| Operands | Op | Since | Meaning |
|---|---|---|---|
flag | A | Locking: 0 the following objects can be selected, 1 locked. | |
showCenter | Ap | 5.0 | 0 hide, 1 show the path’s centre point. |
resolution | Ar | 5.0 | Output resolution in dpi used to compute setflat (default 800). |
| – | Np | 5.0 | Marks a non-printing object, inside %AI5_Begin_NonPrinting … %AI5_End_NonPrinting--. Omitted from final-form files. Non-printing layers use the Lb printing flag instead. |
/identifier (string) | XT | 6.0 | Object tag, written after the object it belongs to. The identifier is letters, digits and _. 7.0 defines /AdobeURL (url) for links. |
%_ languageID | XL | 5.5 | Hyphenation dictionary: 0 US English, 1 UK English, 2 French, 3 German, 4 Spanish, 5 Dutch, 6 Italian, 7 Swedish, 8 Norwegian, 9 Finnish, 10 Danish, 11 Hungarian. |
Path attributes
| Operands | Op | Meaning |
|---|---|---|
[array] phase | d | setdash. Initially solid. |
flatness | i | setflat, 0 to 100; 0 means the flatness in effect when the prolog ran. |
flag | D | Winding order: 0 clockwise, 1 counter-clockwise. (The operator list calls it “polarized fill style”.) |
linejoin | j | setlinejoin: 0 miter, 1 round, 2 bevel. Initially 0. |
linecap | J | setlinecap: 0 butt, 1 round, 2 projecting square. Initially 0. |
miterlimit | M | setmiterlimit, greater than 1. Initially 4. |
linewidth | w | setlinewidth. Initially 1; 0 is the thinnest line the device can draw. |
%AI3_Note: text | comment | A note of up to 254 characters attached to the object. |
Path construction
A path starts with m. Lower-case operators make the new current point a
smooth point (collinear with its two direction points); upper-case ones make it a
corner. A path has at most 8191 segments.
| Operands | Op | Meaning |
|---|---|---|
x y | m | moveto. |
x y | l, L | Line to x, y. |
x1 y1 x2 y2 x3 y3 | c, C | Bézier curve to x3, y3 with direction points x1, y1 and x2, y2. |
x2 y2 x3 y3 | v, V | Curve whose first direction point is the current point. |
x1 y1 x3 y3 | y, Y | Curve whose second direction point is the end point x3, y3. |
Path painting
Each painting operator consumes the path. Filling uses the non-zero winding rule
unless XR says otherwise.
| Op | Meaning |
|---|---|
F | Fill, leaving the path open. |
f | Close, then fill. |
S | Stroke. |
s | Close, then stroke. |
B | Fill and stroke. |
b | Close, fill and stroke. |
N, n | Neither fill nor stroke (invisible paths used as templates or marks). One of them closes the path first; the specification contradicts itself: its grammar and operator list say N closes, its section 5.3.3 says n does. |
H | Neither fill nor stroke, without consuming the path; used for masks. |
h | Close, then as H. |
W | Intersect the clip with the path (until the matching Q); used for masks. |
n XR | Fill rule (6.0): 0 non-zero winding, 1 even-odd; other values are treated as 0. |
Colour and overprint
Lower case sets the fill, upper case the stroke. Values have up to four decimal places.
| Operands | Op | Since | Meaning |
|---|---|---|---|
gray | g, G | Grey, 0.0 black to 1.0 white. | |
c m y k | k, K | CMYK, 0.0 to 1.0. Without setcmykcolor the prolog uses red = 1 − min(1, c + k) and so on. | |
c m y k (name) tint | x, X | Custom (spot) colour with CMYK approximation. The tint is 1 − (user percentage / 100); the CMYK values are multiplied by it. | |
r g b | Xa, XA | 7.0 | RGB, 0.0 to 1.0. |
comp… (name) tint type | Xx, XX | 7.0 | Generic custom colour; type 0 CMYK, 1 RGB. Illustrator 7 writes only r g b (name) tint 1. |
(name) px py sx sy angle rf r k ka [a b c d tx ty] | p, P | Pattern: tiling origin offset from the ruler origin, x and y scale, rotation (degrees anticlockwise), reflect flag (1 yes) and reflection axis angle, shear angle and shear axis, then an initial matrix for other transformations. | |
flag | O, R | Overprint fill, stroke: 1 on, 0 off. |
Gradient instances (5.0)
A path filled with a gradient is followed by Bb, the instance
operators, the painting operator and BB. Definitions (Bn,
Bd, %_Bs, %_Br, BD) are in the
setup.
| Operands | Op | Meaning |
|---|---|---|
| – | Bb | Begin the instance; replaces the painting procedures until BB. |
flag | BB | End: 0 no stroke, 1 stroke, 2 close and stroke. |
flag (name) xOrigin yOrigin angle length a b c d tx ty | Bg | Geometry. Flag 0 no clip (default), 1 clip, 2 disable rendering. Origin is 0 on the ramp; angle is anticlockwise from the x axis; length is the 100% point; the matrix starts as identity and collects the user’s transformations. Coordinates are relative to a canvas origin at (−4014, 4716). |
xHilight yHilight angle length | Bh | Radial highlight: offset from the origin, and angle and length (fraction of the radius, 0 to 1). Illustrator uses angle and length; other programs such as Photoshop use the offsets. |
a b c d tx ty | Bm | Imaging only: matrix of one blend section. Radial gradients need one. |
a b c d tx ty | Bc | Imaging only: matrix of a solid end cap of a linear gradient. |
a b c d x y | Xm | 7.0, after Bg: overall gradient matrix for the Level 3 procset; ignored on reading. |
For radial gradients the vector origin is the centre and the length the radius; the
angle is kept for a later change back to linear. The specification gives the instance
transform as x′ = a(x − xO) − c(y − yO) + tx + xO and y′ = −b(x −
xO) + d(y − yO) + ty + yO with xO = −4014, yO = 4716.
Groups, masks, guides and layers
| Op | Since | Meaning |
|---|---|---|
u … U | Group. | |
q … Q | Group containing a mask (clipping path built with h/H and W); Q restores the clip of the matching q. | |
*u … *U | Compound path: its paths are painted as one, so overlaps can show through (as in the counter of a letter A). | |
*w … *W | Wraparound group: objects, an area text object, then the objects the text wraps around. | |
(render) * | Guide: a path written as (N) * … path … (N) *, where the string is a painting operator. Guides do not print. | |
Mb, Md, MB | 5.0 | Multi-layer mask: Mb begins the masked objects, Md follows the mask path, MB ends them. Dropped in 7.0, which ignores them or converts them to single-layer masks. |
visible preview enabled printing dimmed hasMultiLayerMasks colorIndex red green blue Lb | 5.0 | Begin a layer, inside %AI5_BeginLayer … %AI5_EndLayer--. Flags are 1 or 0. Layer colour index: 0 light blue, 1 red, 2 green, 3 blue, 4 yellow, 5 magenta, 6 cyan, 7 grey, 8 black, 9 orange, 10 dark green, 11 teal, 12 tan, 13 brown, 14 violet, 15 gold, 16 dark blue, 17 pink, 18 lavender, 19 brick red, 20 olive green, 21 peach, 22 burgundy, 23 grass green, 24 ochre, 25 purple, 26 light grey, −1 other; RGB 0 to 255. |
(name) Ln | 5.0 | Layer name. |
LB | 5.0 | End layer. |
Text objects with render modes 4 to 7 also act as masks; Illustrator prints but does not preview them.
Patterns
| Operands | Op | Meaning |
|---|---|---|
(name) llx lly urx ury [layers] | E | Define a pattern with this tile box. |
(colordefinition) | @ | Colour and overprint of a pattern layer. |
(tiledefinition) | & | Styles and paths of a pattern layer. |
| – | _ | Fill the tile rectangle with the @ fill colour. |
Raster images (6.0)
[a b c d tx ty] llx lly urx ury h w bits ImageType AlphaChannelCount reserved
bin-ascii ImageMask XI, between %AI5_BeginRaster and
%AI5_EndRaster (the examples put %AI5_File: before them), with
the pixel data as comment lines.
| Operand | Meaning |
|---|---|
[a b c d tx ty] | Image matrix. |
llx lly urx ury | Bounds. |
h w | Size. (The specification calls them height and width; its examples, such as 0 0 526 620 526 620, repeat the bounds’ width and height in that order.) |
bits | Bits per pixel. |
ImageType | 1 bitmap or greyscale, 3 RGB, 4 CMYK. |
AlphaChannelCount | 0 in 6.0; other values reserved. |
reserved | Reserved. |
bin-ascii | 0 ASCII hex, 1 binary (Motorola byte order). |
ImageMask | 0 opaque, 1 transparent and colourisable. |
XF (7.0) has the same operands for a linked image with no data in the
file, and must follow (path) modified XG: the platform path of the linked
file, and 1 if the image was edited since it was read, else 0.
Placed art
[a b c d tx ty] llx lly urx ury (filename) ' places an EPS file: the
matrix sets its user space, the box is the file’s %%BoundingBox, and the
graphics state is reset as for any EPS import. It is followed by
%%IncludeFile: filename (the same name) or the file itself between
%%BeginDocument: and %%EndDocument (allowed in EPS output but
not part of the Illustrator format), then ~, which restores the user space.
%AI3_Subscriber: id before a placed object refers to a System 7 edition
(sect, bnds and psop resources with that
ID).
Text
A text object is type To … TO holding one or more text
paths a b c d tx ty startPt Tp … TP (with a path object for
area and path text), each followed by text runs: style, paint and position operators,
then a text body. Several paths in one object mean linked area text. Final-form
operators can be left out; Illustrator recomputes them, but the file then is not a
valid EPS file.
| Operands | Op | Kind | Meaning |
|---|---|---|---|
type | To | revisable | Begin text: 0 point, 1 area, 2 path text. |
| – | TO | revisable | End text, restoring the matrix. |
a b c d tx ty startPt | Tp | revisable | Begin a text path; the matrix is concatenated to the CTM. For path text, startPt is the start position in segments (1.5 is the middle of the second segment). |
| – | TP | revisable | End the text path. |
a b c d tx ty | Tm | final | Text matrix (text on a path). |
tx ty | Td | final | Translate to the next line. |
| – | T* | final | Translate by the leading to the next line. |
a b c d tx ty | TR | final | Reset the pattern matrix (pattern prototypes only). |
render | Tr | revisable | 0 fill, 1 stroke, 2 fill and stroke, 3 invisible, 4 mask and fill, 5 mask and stroke, 6 mask, fill and stroke, 7 mask only, 8 fill followed by mode 9, 9 stroke after mode 8 (8 and 9 in pattern prototypes). |
| – | Te | End render (in the operator list only). | |
/_fontname size ascent descent | Tf | revisable | Re-encoded font and size in points. Ascent and descent (7.0) are for vertical printing and ignored on reading. |
alignment | Ta | revisable | 0 left, 1 centre, 2 right, 3 justified, 4 justified including the last line. |
leading paragraphLeading | Tl | revisable | Line leading and extra space between paragraphs. |
userTracking | Tt | revisable | Tracking in 1/1000 em. |
min opt max | TW | revisable | Word spacing, percent of a space. |
wordSpace | Tw | final | Computed word spacing. |
min opt max | TC | revisable | Character spacing, percent of a space. |
charSpace | Tc | final | Computed character spacing. |
rise | Ts | revisable | Baseline shift in points. |
firstStartIndent otherStartIndent stopIndent | Ti | revisable | Indents in points; the first is relative to the left indent. |
parallelScale perpendicularScale | Tz | revisable | Horizontal and vertical text scaling. |
autoKern | TA | revisable | 1 use the font’s kerning pairs. |
hangingQuotes | Tq | revisable | 1 hang punctuation (. , ; : ` ‘ ’ “ ” - – —) outside the text block. |
(string) | Tx | revisable | Unjustified text in the platform encoding; \r starts a paragraph. |
(string) | Tj | revisable | Justified text. |
(string) | TX | revisable | Overflow text (not visible). |
(string) justified | TS | Special characters (in the operator list only). | |
autoKern kernValue | Tk, TK | revisable | Kern: 0 manual with the value in 1/1000 em, 1 automatic. TK is for overflow text. |
| – | T+ | revisable | Non-printing discretionary hyphen before or after the run. |
| – | T- | revisable | The run ended in a printed discretionary hyphen. |
hyphenate limitHyphLines minLeadHyphen minTailHyphen maxHyphLines | Th | Hyphenation: auto on/off, limit consecutive hyphens on/off, letters before and after, maximum consecutive hyphenated lines. | |
numDots numTabs | Xb | 7.0 | Begin tab definitions (dot leader distance, count). |
leader decimal tabType tabPosition | Xe | 7.0 | One tab: leader and decimal reserved; type 1 left, 2 centre, 3 right, 4 decimal; position in points. |
| – | XB | 7.0 | End tab definitions. |
direction | TV | 7.0 | 0 horizontal, 1 vertical writing. |
rotate | Tv | 7.0 | In vertical text: 0 rotate Roman characters 90° clockwise, 1 do not. |
kumi | Ty, TY | 7.0 | 1 begins, 0 ends a Kumi (horizontal-in-vertical) block. TY only records it for later. |
bindrepeat | Tg | 7.0 | 0 neither, 1 binding punctuation, 2 repeat character, 3 both. |
linebreak | TG | 7.0 | Line Breaking value, 0 to 100 percent. |
%_prop cjkLayout cjkRoman cjkCjk | Xu | 7.0 | Japanese layout rules: proportional CJK on/off, rules on/off, CJK/Roman and CJK/CJK values (0 to 200). Held internally as Tu. |
Before Illustrator 7.0, non-Japanese versions report an error on TV and
Tv. The operator list also names I (path text) and
Z (text) without describing them.
Graphs
A graph is Gs, a functional specification, optional customisations, the
graph’s ordinary objects in nested groups, and GS. The specification
lines start %_. Illustrator draws the objects as written and recalculates
from the specification only on request.
| Operands | Op | Meaning |
|---|---|---|
| – | Gs, GS | Begin and end the graph. |
left top right bottom | Gb | Rectangle on whose edges the axes are drawn. |
graphType shadow dataPaintOrder pieLegendStyle drawMarks drawLines drawLinesAsShapes drawLegendsAcrossTop lineShapeWidth whichAxis [piePercentage piePctDigits] | Gy | Graph style, for the graph or one series. Type 5 grouped column, 6 stacked column, 7 line, 8 pie, 9 scatter, 10 area. Pie legend 14 as bar graphs, 15 in wedges, 16 none. Axis 44 left, 45 right. Line shape width 0 to 100 points (default 6). The pie values are Illustrator 4 for Windows only. |
colWidth cellTableDecimalPrecision seriesPaintOrder useBothAxis barWidthPercentage groupWidthPercentage drawLinesEdgeToEdge | Gd | Whole-graph style: column width 3 to 20 characters, 0 to 10 decimals, bar and group widths 1 to 1000 percent. |
leftColumn topRow rightColumn rightRow sectionID | Gj | System 7 subscription to a text edition. |
whichAxis (beforeString) | Ga | Begin an axis: 1 bottom, 2 left, 4 right. Prefix up to 9 characters. |
useManualValues tickMarkType minimumValue maximumValue betweenValue smallTicksPerValue drawMarksBetweenLabels (afterString) | GA | Axis values. Ticks 13 none, 14 short, 15 long. A negative step puts the maximum at the bottom or left. Small ticks 0 to 1000. |
rows columns firstDataRow firstDataColumn | Gz | Cell table size; first data row and column are 0 or 1. |
values… | Gc | Cell values, row by row; at most 15 operands and one string each; () is an empty cell. |
col width… numParams | Gw | Column widths from column col, up to 14; −1 is the default. |
| – | GC | End of the cell table. |
version | Gt, GT | Begin (version 2) and end customisations. |
target graphCustomization | Gx | Target: 0 graph, 1 all series with legends, 2 one series with legend, 3 one series without, 4 one bar, line or wedge, 5 all marks, 6 one series’ and legend’s marks, 7 one series’ marks, 8 one line segment’s mark, 9 one axis, 10 category axis line, 11 major ticks, 12 one major tick, 13 tick labels, 14 one tick label, 15 all legend text, 16 one legend’s text, 17 numeric axis line, 18 one legend box or line, 19 one legend mark, 20 category labels, 21 one category label, 22 shadow, 23 every tick of an axis, 24 minor ticks, 25 one minor tick. Customisation: 0 Illustrator, 1 series graph style, 2 column design, 3 mark design. |
illustratorCustomization | Gp | 0 move, shear, rotate or scale; 1 paint style; 9 send to front or back; 10 character style; 11 layout style. |
changeMethod | G+ | 0 replace, 1 add to the previous value. |
sendToFront | G1 | 0 back, 1 front. |
doFill doStroke fillStyle strokeStyle isAMask | Gf | Paint style customisation; styles 0 black or white, 1 process, 2 pattern, 3 custom colour, 4 blend (Windows 4.0). |
column, row, whichAxis | Gl, Gr, Gi | Target series, point and axis (axis 1 bottom, 2 left, 4 right, 8 top in the Japanese edition). |
a b c d h v generalGraphType 0 0 | Gm | Matrix customisation; graph types 1 column, 2 scatter and line, 3 pie, 4 area, 5 all. |
(designName) designType repeatPartialType rotateLegend | GD | Column design: 6 vertically scaled, 7 uniformly scaled, 8 repeating, 9 sliding; partial values 16 chopped, 17 scaled. |
repeatEachValue | Ge | Value per repetition of a repeating design. |
tickValue | Gv | Tick value a tick customisation applies to; the only one written after GX. |
| – | GX | Finish one customisation. -- stands for a value left unset. |
target column row whichAxis illustratorCustomization graphCustomization 0 changeMethod | Gg | Obsolete combined form, not written by Illustrator. |
target column row whichAxis | Go | After a graph object, says what it is: 1, 2, 4, 5, 6, 8, 9, 10, 15, 20 or 22 as for Gx. |
Graph objects are grouped: left axis, right axis, legend, category axis, then for each series a group of its legend box and data; empty groups must be kept.
Source
- Adobe Illustrator File Format Specification – Adobe Technical Note LPS5007, 23 February 1998, sections 5 to 18, 22 and Appendix A (archived copy of Adobe’s partners site)