This page follows Adobe’s “Adobe Illustrator File Format Specification” (Technical Note LPS5007, 23 February 1998), which covers files from Illustrator 1.0/1.1, 88, 3.0/3.2, 4.0 (Windows), 5.0/5.5, the 5.x Japanese edition, 6.0 and 7.0, and Illustrator EPS. It applies to the PostScript-based layout only; the PDF-based files of Illustrator 9 and later are described on the versions and layout page. Version marks such as “5.0” below give the Illustrator version that introduced a comment or operator.
Document grammar
An Illustrator file is a PostScript document that follows the Document Structuring Conventions (see the DSC comments): a prolog and a script. Illustrator’s own operators are defined by procedure sets (procsets) that the prolog names; Illustrator’s native files do not contain the procsets themselves, which Adobe licensed separately and left largely undocumented. The native format is not an official EPS file; Illustrator EPS adds what EPS requires.
<document> ::= <prolog> <script>
<prolog> ::= %!PS-Adobe-M EPSF-N (or %!PS-Adobe-M)
<header comments>
%%EndComments
%%BeginProlog
{<procset>}*
%%EndProlog
<procset> ::= %%IncludeResource: procset <name>
| %%BeginResource: … %%EndResource
<script> ::= <setup>
{<layer>}* | {<object>}*
{<page trailer>}
<document trailer>
%%EOF
<setup> ::= %%BeginSetup
{%%IncludeFont: font}*
{<procset init>}*
<font encoding>
<gradient defs>
<color palette>
<pattern defs>
<gradient defs>
%%EndSetup
<procset init> ::= <dict name>+ /initialize get exec
<page trailer> ::= %%PageTrailer
gsave annotatepage grestore showpage
<document trailer> ::= %%Trailer
{<proc set termination>}*
{x} is
optional, {x}* zero or more, x+ one or more)The first line gives the DSC version, and optionally the EPSF version, that the file
was written to, for example %!PS-Adobe-3.0 EPSF-3.0.
Kinds of comment
| Form | Name | Use |
|---|---|---|
%… | Standard comment | Ordinary PostScript comment. When it starts %AIn_Keyword, n is the Illustrator version that introduced the keyword, and the comment carries data for an operator (for example raster data for XI). Newer programs and the interpreter read them only when relevant; older programs ignore them. |
%%… | Structural comment | DSC comment: %%Keyword{: arguments}. |
%_… | Pseudo comment | Illustrator data the interpreter ignores when printing but applications read, such as gradient colour stops (%_Bs) and graph specifications. Older and newer applications both understand them. |
From version 5, new operators starting with X extend the format in a
backward-compatible way: newer applications and the interpreter understand them; older
applications ignore them.
Revisable and final form. Illustrator files, including Illustrator EPS, are revisable: they hold information needed for editing but not printing, such as unused gradient definitions. A final-form file holds only what printing needs; it can still be read, but relationships between objects may be lost.
Header comments
Most are optional. “Required” and “as necessary” are the specification’s own marks.
| Comment | Since | Meaning |
|---|---|---|
%%Creator: Adobe Illustrator(r) version | The creating application; the version is free text to the end of the line. | |
%%For: (username) (organization) | User and organisation, as PostScript strings. | |
%%Title: (title) | Title, a PostScript string. | |
%%CreationDate: (date) (time) | Date and time, as PostScript strings. | |
%%BoundingBox: llx lly urx ury | Required. Integer box enclosing all marks, in default user space; negative values allowed. When a high-resolution box is given, this one is derived from it: llx and lly rounded down, urx and ury rounded up. | |
%%HiResBoundingBox: llx lly urx ury | Real-number bounding box, contained within %%BoundingBox, for accurate placement as EPS. | |
%%DocumentProcessColors: keywords | Which of Cyan, Magenta, Yellow, Black are used. | |
%%DocumentCustomColors: (name), %%+ (name) | As necessary. Names of custom colours, for example (PANTONE 156 CV). | |
%%CMYKCustomColor: c m y k (name) | As necessary. CMYK approximation of each custom colour, 0.0 to 1.0. | |
%%RGBCustomColor: r g b (name) | 7.0 | As necessary. RGB approximation of each RGB custom colour, 0.0 to 1.0. |
%%DocumentFonts: font… | As necessary. Fonts used, including those of placed files. | |
%%DocumentNeededFonts: font… | 7.0 | As necessary, in EPS files: fonts needed but not included. |
%%DocumentSuppliedFonts: font… | 7.0 | As necessary, in EPS files: fonts included in the file. |
%%DocumentFiles: filename… | As necessary. Files to import (placed art); each has an %%IncludeFile where it is used. | |
%%DocumentSuppliedResources: procset name version revision | 3.0 | Procsets both required and defined in the file. Not written in the “no-header” form. |
%%DocumentNeededResources: procset name version revision | 3.0 | Procsets required but not included. |
%%IncludeResource: procset name version revision | 3.0 | A resource to include; present only in the “no-header” form. |
%AI5_FileFormat version | 5.0 | Which Illustrator wrote the file, even when saved for an older version. Values on the versions page. |
%AI3_ColorUsage: Black&White | Color | 3.0 | Whether only black or coloured ink is used. Named %%ColorUsage in 88 and 4.0. |
%AI3_TemplateBox: llx lly urx ury | 3.0 | Box enclosing the template’s samples (each 1/72 inch); width and height are integers, both 0 when there is no template. Illustrator centres this box’s centre in the drawing area. Named %%TemplateBox in 88 and 4.0. |
%AI3_TemplateFile: pathname | 3.0 | As necessary. The template file, as volume::directoryID:filename; none if empty. |
%AI3_TileBox: llx lly urx ury | 3.0 | Macintosh only: imageable area of the current page size. Named %%TileBox in 88 and 4.0. |
%AI3_DocumentPreview: keyword | 3.0 | Kind of preview in the file; None when there is none. |
%%AI3_PaperRect: ulx uly lrx lry | 3.0 | Paper rectangle relative to the imageable area, origin at its upper left, y increasing downwards. |
%AI5_ArtSize: height width | 5.0 | Artboard size in points (the specification gives the order height, width). |
%AI5_RulerUnits: units | 5.0 | 0 inches, 1 millimetres, 2 points, 3 picas, 4 centimetres. |
%AI5_ArtFlags: … | 5.0 | Nine Document Setup flags, below. |
%AI5_TargetResolution: resolution | 5.0 | Target output resolution. |
%AI5_NumLayers: n | 5.0 | Number of layers. |
%AI5_OpenToView: … | 5.0 | Window state, below. |
%AI5_OpenViewLayers: layer_number | 5.0 | Layer to show on opening; more layers follow on further lines. |
%%AI6_ColorSeparationSet: version magicNumber setname | 6.0 | A named set of separation settings with subcomments, below. |
%AI7_ImageSettings: flag | 7.0 | 1 if linked images are embedded, 0 if not. |
%AI7_GridSettings: … | 7.0 | Grid, below. |
%%Creator: Adobe Illustrator(r) 6.0
%%For: (John Doe) (John Doe Design)
%%Title: (LayeredGradients.ai)
%%CreationDate: (5/9/96) (3:57 PM)
%%BoundingBox: 224 631 268 661
%%HiResBoundingBox: 224.065 631 268 660.5208
%%DocumentProcessColors: Cyan Magenta Yellow
%%DocumentCustomColors: (PANTONE 156 CV)
%%CMYKCustomColor: 0.5 0.5 0.5 0.5 (PANTONE 156 CV)
%%DocumentFonts: CooperBlack
%%+ Minion-Regular
%%DocumentNeededResources: procset Adobe_level2_AI5 1.0 0
%%+ procset Adobe_typography_AI5 1.0 0
%%+ procset Adobe_Illustrator_AI5 1.0 0
%AI5_FileFormat 2.0
%AI3_ColorUsage: Color
%AI3_TemplateBox: 306 396 306 396
%AI3_TileBox: 31 31 583 761
%AI3_DocumentPreview: None
%AI5_ArtSize: 612 792
%AI5_RulerUnits: 2
%AI5_ArtFlags: 1 0 0 1 0 0 0 1 0
%AI5_TargetResolution: 800
%AI5_NumLayers: 2
%AI5_OpenToView: -78 780 1 826 581 58 0 1 2 40
%AI5_OpenViewLayers: 77
%%EndComments
%AI5_ArtFlags
| Position | Flag | 1 | 0 |
|---|---|---|---|
| 1 | page_setup | Use page setup | Do not |
| 2 | tiles | Use print tiles | Do not |
| 3 | placed_images | Show placed images | Do not |
| 4 | patterns | Preview patterns | Do not |
| 5 | split_paths | Split long paths | Do not |
| 6 | tile_page | Tile full pages | Do not |
| 7 | screens | Use printer’s default screens | Do not |
| 8 | autoscreens | Use auto default screens (ignored when flag 7 is 0) | Do not |
| 9 | gradients | Use compatible gradient printing | Do not |
%AI5_OpenToView
%AI5_OpenToView: ulx uly zoom w h view_style ruler tiling ul_monx ul_mony grid snap_grid
| Parameter | Type | Meaning |
|---|---|---|
ulx uly | integer | Artwork coordinates of the window’s top left corner. |
zoom | integer | Zoom factor; negative means 1/x. |
w h | real | Window width and height in pixels. |
view_style | integer | 25 artwork, 26 preview, 30 preview selection. |
ruler, tiling, grid, snap_grid | boolean | 1 show ruler, show tiling, show grid, snap to grid; 0 not. |
ul_monx ul_mony | integer | Window position on the monitor. |
The specification calls these twelve parameters, though the example it gives has ten values.
%AI7_GridSettings
%AI7_GridSettings: horiz_space horiz_subdiv vert_space vert_subdiv back style
gridcolorR gridcolorG gridcolorB subdivcolorR subdivcolorG subdivcolorB
| Parameter | Type | Meaning |
|---|---|---|
horiz_space | integer | Points between gridlines. |
horiz_subdiv | integer | Subdivisions (“Gridline every”). |
vert_space, vert_subdiv | integer | The same vertically; in 7.0 equal to the horizontal values. |
back | boolean | 1 gridlines behind the artwork, 0 in front. |
style | integer | 0 lines, 1 dots. |
gridcolorR G B, subdivcolorR G B | real | RGB of the gridlines and of the subdivisions. |
Colour separation set (6.0)
%%AI6_ColorSeparationSet: version magicNumber setname; version 1 (other
versions are ignored), magic number ignored, set name reserved. Subcomments follow on
%%+ lines as %%+ name: version magicNumber arguments…; a newer
version of a subcomment may follow an older one and overrides it in programs that know
it.
| Subcomment | Magic | Arguments |
|---|---|---|
Options | 16 | separate (1 separations, 0 composite), level2 (1 Level 2, 0 Level 1), ASCIIOutput (1 ASCII images, 0 binary), portrait (1 portrait, 0 landscape), emulsiondown, negative, overprintblack, convertoprocess, previewart, usedefaultmarks, layers (1 printable, 2 visible, 3 all), bleed (points), artbounds left top right bottom, cropbounds left top right bottom (points, default user space), halftoneindex and pagesizeindex (zero-based list indices). |
PPD | 21 | customAvailable (from ParamCustomPageSize or VariablePaperSize), rollFedDevice (true if no HWMargins), default halftone frequency angle screenIndex transferIndex, device adjust matrix a b c d h v (reserved), customMaximum.h .v, customImageArea left top right bottom, ppdFile.vRefNum and .dirID (Macintosh), ppdFile.fileName. |
StringAdd, StringSplit | 3 | listID (1 screen procedures, 2 transfer procedures, 3 page size set-up procedures), stringLength, then the string, starting one space after the length. StringSplit continues a string that would pass 255 characters. |
Halftone | 23 | halftoneName translatedName unused, then angle, frequency, screen index and transfer index for cyan, magenta, yellow, black and custom plates, taken from the PPD’s ColorSep… keys. |
Process | 4 | status (0 do not separate, 1 separate, 2 convert to process, custom plates only), frequency angle plate (0 cyan, 1 magenta, 2 yellow; the specification prints 3 as “magenta” again, for the fourth process plate). |
Custom | 4 | status frequency angle colorName. |
PageSize | 12 | pageProc custom transverse offset width height imageArea left top right bottom, mediaName translation. |
The specification’s introduction to the options subcomment writes it
%%++ Options and its examples %%+ Options.
Ruler origin
Artwork, the bounding box, template box and tile box are written relative to the ruler origin, x to the right, y up, bounds in the order left, bottom, right, top. The template box is always centred on the artboard (a degenerate box at its centre when there is no template), so a reader can recover the ruler origin from the artboard size, in Macintosh coordinates with y down:
x = (artboard width − templateBox.left − templateBox.right) / 2
y = (artboard height + templateBox.top + templateBox.bottom) / 2
A program that does not care about Illustrator’s ruler can pick any convenient origin, such as a corner of the bounding box.
Setup section
Fonts and encodings
Illustrator re-encodes every font it uses. [encodingPairs TE sets the
platform’s standard encoding (there is no closing bracket). Then each re-encoded font
is defined:
%AI3_BeginEncoding: _Times-Roman Times-Roman
[ 39/foo 96/bar 128/bzaa/bazb
/_Times-Roman/Times-Roman 0 0 1 TZ
%AI3_EndEncoding AdobeType
encodingPairsiscode/name/name…runs: each code (0 to 255) is the first index to replace, and the following names fill successive indices.TZforms:[ newFontName oldFontName direction fontScript useDefault TZ, the same withencodingPairsfirst, and both again with a final Multiple Master weight vector[w0 w1 … wn].direction: 0 horizontal, 1 vertical writing; present only in 3.x and the Japanese edition.fontScript: 0 Roman, 1 Japanese, 2 traditional Chinese, 3 Korean, 25 simplified Chinese.useDefault: 1 use theTEencoding, 0 not (for pi, non-Roman and TrueType fonts).- The font type after
%AI3_EndEncodingisAdobeTypeorTrueType.%%IncludeFont:names fonts Illustrator should look for; it substitutes another if missing.
Patterns
%AI3_BeginPattern: (patternname)
(patternname) llx lly urx ury [ <pattern layers> ] E
%AI3_EndPattern
Each pattern layer is (colordefinition) @ followed by
(tiledefinition) &. The colour definition is a string holding
overprint (O, R) and colour operators (g G k K x
X); the tile definition is a string holding ordinary path objects, so a layer is
limited to 64 KB. The first layer is the tile background; the _ operator
fills the tile rectangle with the fill colour given to @. Patterns may hold
paths and text but not placed files or graphs. Version 6 files bracket each tile
layer’s contents with %AI6_BeginPatternLayer and
%AI6_EndPatternLayer, and the specification’s example has an
%AI3_Tile line before the first layer. (“Layers” here are paint order, not
document layers.)
Gradients (5.0)
2 Bn
%AI5_BeginGradient: (Red & Yellow)
(Red & Yellow) 0 2 Bd
[
0 1 1 0 1 50 0 %_Bs
0 0 1 0 1 50 100 %_Bs
BD
%AI5_EndGradient
nGradients Bn: number of gradients; required only when there are any.name type nColors Bd: type 0 linear, 1 radial.colorSpec colorStyle midPoint rampPoint %_Bs, one per colour (at least two).rampPointis a percentage along the vector, strictly increasing;midPointis 13 to 87, ignored for the last stop. Colour styles: 0 grey (1 value), 1 CMYK (4), 2 RGB (7: c m y k r g b), 3 CMYK custom (6: c m y k name tint), 4 RGB custom (10: c m y k r g b name tint type, type always 1).rampSpec… rampType %_Br, written for imaging (printing, EPS), after a[: types 0 grey (1 string), 1 CMYK (4), 2 one CMYK custom colour (5), 3 two CMYK custom colours (6), 4 RGB (7), 5 one RGB custom colour (8), 6 two RGB custom colours (9). Each is a hex string forimage; a constant channel is written as one integer (01010101as 1,FFFFFFFFas 255). Types 4 to 6 are new in 7.0.BDends the definition.
Gradient instances, which paint objects, are on the operators page.
Colour palette (5.0)
Between %AI5_BeginPalette and %AI5_EndPalette:
topLeftCellIndex selectedIndex Pb, then the cells, each started by
Pc and followed by its paint (grey, CMYK, custom colour or a gradient
instance), or Pn for a cell painted “none”; a final Pc, then
PB. Cells are numbered from the upper left. Gradient origins in palette
cells (such as -4014 4716) are meaningless and recomputed on use.
Global objects (7.0)
Patterns and gradients are global objects: named, defined in the setup, kept even
when unused, and written to a print or EPS stream only when used. The name shown to the
user is the part before a \n in the stored name. When a file brings a
global object with the same name as one already open, the newer definition
replaces the older.
Trailer
After %%Trailer, each procset initialised in the setup is terminated in
reverse order, for example Adobe_Illustrator /terminate get exec, then
%%EOF. A page trailer, when present, is %%PageTrailer
followed by gsave annotatepage grestore showpage.
Macintosh resources
| Resource | ID | Contents |
|---|---|---|
PICT | 256 | Preview. The picFrame matches %%BoundingBox. Two bitmaps: the mask, drawn first in srcBic mode, then the image in srcOr mode; a set mask bit means the pixel is painted. |
TEMP | 256 | Template file: 32-bit directory ID (0 if none), Pascal string volume name, Pascal string file name. |
PAGE | 256 | Page origin from the Page tool: two 32-bit fixed-point numbers, y then x, in points. |
PREC | 256 | The 120-byte Printing Manager print record. |
Save options: no preview without EPSF header; no preview with EPSF header; black-and-white PICT; colour PICT; IBM PC (TIFF), a binary file with a pointer to TIFF data (the DOS EPS header). The last four write the same data fork.
Illustrator 4 for Windows
Uses a subset of the header: %%Creator: Adobe Illustrator(TM) version,
%%For, %%Title, %%CreationDate,
%%DocumentProcSets: Adobe_Illustrator_version level revision,
%%DocumentSuppliedProcSets:, %%DocumentFonts,
%%BoundingBox, %%TemplateBox, plus four comments that replace
the Macintosh resources:
| Comment | Meaning |
|---|---|
%%Template: filename | Full path of the template. |
%%PageOrigin: x y | Page origin in points; the ruler origin if omitted. |
%%PrinterName: name | Printer brand name, for example “Apple LaserWriter”. |
%%PrinterRect: llx lly urx ury | Printer’s image area, in fourth-quadrant coordinates (y = 0 at the top). Letter portrait if omitted; ignored on the Macintosh. |
In some versions text items in comments are PostScript strings; in others the last item runs to the end of the line.
Grid (Windows 4 and NeXT 3). %AI3_Grid.version hzSpace vtSpace
gridSnap R G B visibility, just before %%EndProlog: version 0;
spacing in display pixels from the page origin; gridSnap bits 0
horizontal snap, 1 vertical snap, 2 snapping enabled (values 0 to 7); RGB 0.0 to 1.0;
visibility bit 0 grid in front, bit 1 grid visible (values 0 to 3).
Clipboard (AICB)
From Illustrator 5.0 and Illustrator 4 for Windows, art on the clipboard is a complete
ASCII Illustrator file: clipboard type AICB on the Macintosh, and the
registered clipboard format name ADOBE AI3 on Windows.
Source
- Adobe Illustrator File Format Specification – Adobe Technical Note LPS5007, 23 February 1998 (archived copy of Adobe’s partners site)