Ai Scripting Docsforadobe Dev en Latest
Ai Scripting Docsforadobe Dev en Latest
Release 0.0.1
1 What is Scripting? 1
2 Changelog 3
6 Executing Scripts 13
11 Text Objects 23
12 Dynamic Objects 27
13 Symbols 29
14 Transformations 31
17 Measurement Units 39
20 User-interaction levels 45
i
23 Your first Illustrator script 51
24 Object references 53
44 Application 143
45 Artboard 163
46 Artboards 167
47 Brush 171
48 Brushes 175
49 CharacterAttributes 179
50 Characters 193
51 CharacterStyle 197
52 CharacterStyles 201
ii
53 CMYKColor 205
54 Color 209
55 CompoundPathItem 223
56 CompoundPathItems 237
57 Dataset 241
58 Datasets 245
59 Document 249
60 DocumentPreset 281
61 Documents 287
62 EPSSaveOptions 291
63 ExportOptionsAutoCAD 297
64 ExportOptionsFlash 301
65 ExportOptionsGIF 309
66 ExportOptionsJPEG 315
67 ExportOptionsPhotoshop 319
68 ExportOptionsPNG24 323
69 ExportOptionsPNG8 327
70 ExportOptionsSVG 333
71 ExportOptionsTIFF 339
72 FXGSaveOptions 343
73 Gradient 347
74 Gradients 351
75 GradientStop 355
76 GradientStops 359
77 GraphicStyle 363
78 GraphicStyles 367
79 GraphItem 371
80 GraphItems 383
81 GroupItem 387
82 GroupItems 403
iii
83 IllustratorSaveOptions 407
84 ImageCaptureOptions 411
85 Ink 413
86 InkInfo 415
87 InsertionPoint 419
88 InsertionPoints 423
89 Layer 427
90 Layers 437
91 LegacyTextItem 441
92 LegacyTextItems 453
93 Lines 457
94 Matrix 459
95 MeshItem 463
96 MeshItems 475
97 NonNativeItem 479
98 NonNativeItems 491
99 OpenOptions 493
100OpenOptionsAutoCAD 497
101OpenOptionsFreeHand 501
102OpenOptionsPhotoshop 503
103PageItem 505
104PageItems 517
105Paper 601
106PaperInfo 603
107ParagraphAttributes 607
108Paragraphs 619
109ParagraphStyle 623
110ParagraphStyles 627
111PathItems 631
112PathPoint 639
iv
113PathPoints 643
114Pattern 647
115Patterns 649
116PDFFileOptions 653
117PDFSaveOptions 655
118PhotoshopFileOptions 671
119PlacedItems 675
120PluginItems 679
121PPDFile 683
122PPDFileInfo 685
123Preferences 689
124PrintColorManagementOptions 695
125PrintColorSeparationOptions 699
126PrintCoordinateOptions 703
127Printer 707
128PrinterInfo 709
129PrintFlattenerOptions 715
130PrintFontOptions 719
131PrintJobOptions 721
132PrintOptions 727
133PrintPageMarksOptions 733
134PrintPaperOptions 737
135PrintPostScriptOptions 741
136RasterEffectOptions 745
137RasterItems 749
138RasterizeOptions 753
139Screen 757
140ScreenInfo 759
141ScreenSpotFunction 763
142Spot 765
v
143Spots 769
144Story 773
145Stories 779
146Swatch 781
147Swatches 783
148SwatchGroup 787
149SwatchGroups 791
150SymbolItems 795
151Symbol 799
152Symbols 801
153TabStopInfo 805
154Tag 809
155Tags 813
156TextFont 817
157TextFonts 819
158TextFrameItems 823
159TextPath 829
160TextRange 839
161TextRanges 849
162TracingObject 851
163TracingOptions 855
164Variable 863
165Variables 865
166View 869
167Views 871
168Words 873
vi
CHAPTER
ONE
WHAT IS SCRIPTING?
A script is a series of commands that tells Illustrator to perform one or more tasks. These tasks can be simple, affecting
only one object in the current document, or complex, affecting objects in all your Illustrator documents.
The tasks might even involve other applications, like word processors, spreadsheets, and database management pro-
grams.
For the most part, the building blocks of scripting correspond to the Illustrator tools, menus, panels, and dialog boxes
with which you are already an expert. If you know what you want Illustrator to do, you can write a script to do it.
Graphic design is a field characterized by creativity, but aspects of the work are anything but creative. In fact, you
probably notice that the time you spend placing and replacing images, correcting errors in text, and preparing files for
printing at an image-setting service provider often reduces the time you have available for doing creative work.
With a small investment of time and effort, you can learn to write short, simple scripts that perform repetitive tasks for
you. As your scripting skills grow, you can move on to more complex scripts.
Scripting also can enhance your creativity, by quickly performing tasks you might not have time to try. For example,
you could write a script to systematically create a series of objects, modifying the new objects’ position, stroke, and
fill properties along the way. You also could write a script that accesses built-in transformation matrix functions to
stretch, scale, and distort a series of objects. Without scripting, you would likely miss out on the creative potential of
such labor-intensive techniques.
Both actions and scripts are ways of automating repetitive tasks, but they work very differently:
• Actions use a program’s user interface to do their work. As an action runs, menu choices are executed, objects
are selected, and recorded paths are created.
Scripts do not use a program’s user interface to perform tasks, and scripts can execute faster than actions.
• Actions have very limited facilities for getting and responding to information.
You cannot add conditional logic to an action; therefore, actions cannot make decisions based on the current
situation, like changing the stroke type of rectangles but not ellipses.
Scripts can get information and make decisions and calculations based on the information they receive from
Illustrator.
1
Illustrator Scripting Guide, Release 0.0.1
TWO
CHANGELOG
• Added: [Link]()
• Added: [Link]
• Added: [Link]()
• ?
3
Illustrator Scripting Guide, Release 0.0.1
4 Chapter 2. Changelog
CHAPTER
THREE
Illustrator scripting supports VBScript and JavaScript scripts for Windows, and AppleScript and JavaScript scripts for
Mac OS.
For a file to be recognized by Adobe Illustrator CC 2017 as a valid script file, the file must have the correct file name
extension:
You can use the ExtendScript Toolkit to create JavaScript scripts explicitly for Illustrator, or you can use Adobe Exten-
sion Builder and the Creative Cloud SDK to develop extensions in ActionScript.
Extensions are Flash-based (SWF) and can potentially work in a variety of Creative Cloud applications.
Creative Cloud applications have an extensibility infrastructure that allows developers to extend the capabilities of the
applications; the infrastructure is based on Flash/Flex technology, and each extension is delivered as compiled Flash
(SWF) file.
Creative Cloud includes the Extension Manager to enable installation of extensions.
An example of an extension that ships with the point products is Adobe Kuler. Kuler has a consistent user interface
across the different suite applications, but has different logic in each, adapted to the host application.
The user interface for an extension is written in ActionScript, using the Flex framework. An extension is typically
accessed through its own menu item in the application’s Extensions menu.
5
Illustrator Scripting Guide, Release 0.0.1
Adobe Extension Builder allows you to design the user interface interactively using the Design view of Flash Builder.
The Creative Cloud SDK also allows you to develop all of the application logic for your extension in ActionScript; you
can develop and debug your extension in the familiar Flash Builder environment.
To develop your application logic, we recommend using the ActionScript Wrapper Library ( CSAWLib ), which ex-
poses the scripting DOM of each host application as an ActionScript library. This is tightly integrated with the Adobe
Extension Builder environment, which includes wizards to help you build your extension’s basic structure, and run and
debug your code against suite applications such as Adobe InDesign, Photoshop and Illustrator.
The methods, properties, and behavior of the scripting DOM is as described in the JavaScript Scripting Reference for
the host application.
For details of how to use Adobe Extension Builder and the wrapper libraries, see the Creative Cloud SDK documenta-
tion, which is accessible from within Adobe Extension Builder.
The CC JavaScript scripting interface allows for limited scripting for plug-ins. A plug-in can define a command,
with an event and notifier, and a handler that performs some action. A JavaScript script can then use the app.
sendScriptMessage() method to send parameters to that plug-in-defined command, and receive a plug-in-defined
response.
For example, the Adobe Custom Workspace plug-in defines a command “Switch Workspace”. A script can invoke this
command with the following code
result = [Link] (
"Adobe Custom Workspace",
"Switch Workspace",
'<workspace="Essentials" >'
);
In this case, the value that the plug-in returns is the string
"<error= errNo>".
If you write Illustrator-specific scripts that use the Illustrator JavaScript DOM directly, you will create ExtendScript
files, which are distinguished by the .jsx extension.
Giving your JavaScript files a .jsx extension (rather than the standard .js extension for a JavaScript file) allows you to
take advantage of ExtendScript features and tools.
ExtendScript offers all standard JavaScript features, plus a development and debugging environment, the ExtendScript
Toolkit (ESTK).
The ESTK is installed with all scriptable Adobe applications, and is the default editor for JSX files. The ESTK includes
an Object Model Viewer that contains complete documentation of the methods and properties of JavaScript objects.
For information on accessing the ESTK and the Object Model Viewer see Viewing the object model.
ExtendScript also provides various tools and utilities, including the following:
• A localization utility
• Tools that allow you to combine scripts and direct them to particular applications
• Platform-independent file and folder representation
FOUR
Adobe provides sample scripts for many objects, properties, and methods in the lllustrator CC DOM. You can view
script samples in two locations:
• In the /Scripting/Sample Scripts/ folder in your lllustrator CC installation directory
• In this document :)
9
Illustrator Scripting Guide, Release 0.0.1
FIVE
Each of the supported scripting languages provides a facility for viewing the scripting objects defined by Illustrator,
with reference details.
To view the JavaScript object model for Illustrator, follow these steps:
In a default Adobe installation, the ESTK is in the following location:
Apple provides a Script Editor with all Mac OS systems. You can use Script Editor to view the AppleScript dictionary
that describes Illustrator objects and commands.
For details of how to use Script Editor, see Script Editor Help.
11
Illustrator Scripting Guide, Release 0.0.1
VBScript provides a type library you can use to view Illustrator object properties and methods. This procedure explains
how to view the type library through any Microsoft Office program. Your VBScript editor probably provides access to
the library. For information see your editor’s Help.
1. In any Microsoft Office application, choose Tools > Macro > Visual Basic Editor.
2. In the Visual Basic Editor, choose Tools > References.
3. In the dialog that appears, select the check box for Adobe lllustrator CC Type Library, and click OK.
4. Choose View > Object Browser, to display the Object Browser window.
5. Choose “Illustrator” from the list of open libraries in the top-left pull-down menu of the Object Browser window.
Several extended sample scripts are in the /Scripting/Sample Scripts/ folder in your lllustrator CC installation
directory.
You also can view script samples and information about individual classes, objects, properties, methods, and parameters
in Illustrator Scripting Reference: VBScript.
SIX
EXECUTING SCRIPTS
The Illustrator interface includes a Scripts menu (File > Scripts) that provides quick and easy access to your scripts.
Scripts can be listed directly as menu items that run when you select them. See Installing scripts in the Scripts menu.
You can navigate from the menu to any script in your file system and then run the script. See Executing scripts from
the Other Scripts menu item.
You also can have JavaScript scripts with a .jsx extension start automatically when you launch the application. For
information, see Startup scripts (.jsx scripts only).
To include a script in the Scripts menu (File > Scripts), save the script in the Scripts folder, located in the /lllustrator
CC/Presets folder in your lllustrator CC installation directory.
The script’s filename, minus the file extension, appears in the Scripts menu.
Scripts that you add to the Scripts folder while Illustrator is running do not appear in the Scripts menu until the next
time you launch Illustrator.
Any number of scripts can be installed in the Scripts menu. If you have many scripts, use subfolders in the Scripts
folder to help organize the scripts in the Scripts menu.
Each subfolder is displayed as a separate submenu containing the scripts in that subfolder.
The Other Scripts item at the end of the Scripts menu (File > Scripts > Other Scripts) allows you to execute
scripts that are not installed in the Scripts folder.
Selecting Other Scripts displays a Browse dialog, which you use to navigate to a script file. When you select the file,
the script is executed.
Only files that are of one of the supported file types are displayed in the browse dialog. For details, see Scripting
language support in Adobe Illustrator CC.
13
Illustrator Scripting Guide, Release 0.0.1
JavaScript scripts with a .jsx file extension can be installed in one of two folders, so the scripts run automatically when
you launch Illustrator and each time you run a script.
The folders are:
• An application-specific startup scripts folder, which contains scripts for IllustratorCC
• A general startup scripts folder, which contains scripts that run automatically when you start any Creative Cloud
application
You must place application-specific startup scripts in a folder named Startup Scripts, which you create in the Illustrator
installation directory.
For example, when IllustratorCC is installed to its default location, you would create the Startup Scripts folder at the
following location:
JavaScript scripts with a .jsx extension placed in the Startup Scripts folder run automatically when:
• The application is launched.
• Any JavaScript file is selected from the Scripts menu (File > Scripts).
The general startup scripts folder contains scripts that run automatically when you start any Creative Cloud application.
You create the folder in the following location:
If a script in the general startup folder is meant to be executed only by Illustrator, the script must include the ExtendScript
#target directive ( #target illustrator ) or code like the following
if ([Link] == "illustrator") {
// continue executing script
}
SEVEN
A good understanding of the Illustrator object model will improve your scripting abilities. The following figure shows
the containment hierarchy of the object model, starting with the application object.
Note that the layer and group item classes can contain nested objects of the same class which can, in turn, contain
additional nested objects.
15
Illustrator Scripting Guide, Release 0.0.1
In addition to this application-specific object model, JavaScript provides certain utility objects, such as the File and
Folder objects, which give you operating-system-independent access to the file system.
For details, see JavaScript Tools Guide.
EIGHT
There is one object model for the Illustrator scripting interface, but actual object names vary slightly in the different
scripting languages:
• AppleScript names are lower case, and individual words are separated by a space; for example: graphic style
• VBScript names are capitalized, and additional words in the name are indicated by uppercase initial letters; for
example: GraphicStyle
• JavaScript names begin with lowercase letters, and additional words in the name are indicated by uppercase initial
letters; for example: graphicStyle
This chapter uses generic object and property names, but you can easily apply these conventions to determine the
corresponding language-specific names.
Throughout this document, names of properties, methods, and object are in a monospaced font.
17
Illustrator Scripting Guide, Release 0.0.1
NINE
Use these objects to access global information about the Illustrator application or an individual document.
9.1 Application
The properties of the application object give your script access to global values, such as:
• User preferences, which a user sets interactively in the Illustrator application by using the Preferences dialog
(Edit > Preferences).
• System information like installed fonts (the text fonts property) and printers (the printer list property).
Also, there are properties that provide application-specific information and higher-level information about any open
documents:
• Application information like the installation path, version, and whether Illustrator is visible.
• The current active document; that is, the art canvas that is displayed and accepting user input.
• All open documents.
The application object’s methods or commands allow your script to perform application-wide actions; for example:
• Open files
• Undo and redo transactions
• Quit Illustrator
9.2 Document
The document object, which your scripts can create or access through the application object, represents an art
canvas or loaded Illustrator file.
The document object’s properties give you access to the document’s content; for example:
• The current selection, or art objects that the user selected in the document
• All contained art objects, called page items, that make up the artwork tree
• Art objects of particular types, like symbols and text frames
• All layers and the currently active layer
19
Illustrator Scripting Guide, Release 0.0.1
Document properties also tell you about the state of the document itself; for example:
• User settings for the document, such as ruler units
• Whether the document was saved since the last alteration of content
• The path of the associated file
The document object’s methods allow your scripts to act on the document; for example:
• Save to an Illustrator file or save as the various supported file formats
• Activate or close a document
• Print the document. Your scripts can select a printer by referencing a print options object, or they can
reference available printers through the application object’s printer list property.
9.3 Layer
The layer object provides access to the contents, or artwork tree, of a specific layer.
You access the layer object through the document object.
The layer object properties provide access to, or information about, the layer, such as:
• Whether the layer is visible or locked.
• The layer’s opacity (overall transparency) and z order position (position in the stacking order).
• Art-creation preferences for the layer, like artwork knockout and blending mode.
TEN
The content of an Illustrator document is called the artwork tree. Artwork is represented by the following objects:
• compound path item
• graph item
• group item
• legacy text item
• mesh item
• non native item
• path item
• placed item
• plugin item
• raster item
• symbol item (see Dynamic Objects)
• text frame
Your scripts can access and manipulate art objects through collections in the document and layer objects.
There are two types of art-object collections:
• Collection objects that correspond to each individual artwork object type, such as the graph items object or
the mesh items object.
• The page items object, which includes art objects of all types.
Also, you can use the group item object to reference a grouped set of art items.
You can create new art objects using the make command (AppleScript) or add method of an artwork item collection
object. For example, to create a new path item object:
The following artwork collections do not allow the creation of new objects using the make command or add method:
• graph items object
• mesh items object
• plugin items object
21
Illustrator Scripting Guide, Release 0.0.1
Your script can apply a graphic style to artwork using the graphic style object. To apply a graphic style, use the
graphic styles property of the document object to access the apply to method of the graphic style object.
Similarly, the brush object allows you to specify the brush to apply to artwork. You access any brush through the
brushes collection object, which is a property of the document object.
Your script can apply a color, pattern or gradient to a path item object, using the fill color or stroke color
properties:
• Scripts can define new color swatches using the make command or add method of the swatches object. Your
script also can create a new spot color, using the make command or add property of the spots object.
• You can define the attributes of an ink object using the ink info object, which is an ink object property. You
access ink objects through the ink list property of the document object.
The following objects allow you to create colors within defined color spaces:
• The RGB color object, using the range 0.0 to 255.0 for the each of the three individual color values.
• The CMYK color object, using the percentage values 0.0 through 100.0 for each of the four individual color
values.
• The grayscale color or LAB color objects, using the same range and number of values that you use in the
Illustrator application.
ELEVEN
TEXT OBJECTS
When you type content in an Illustrator document, the type automatically becomes a text frame object and, at the
same time, a story object.
To observe this, open a new document in Illustrator and use the horizontal text tool to type some text, then use the
vertical text tool to type more text.
Finally, create a rectangle and type some text inside it.
Now run the following JavaScript script
To create a specific kind of text frame, use the kind property of the text frames object in AppleScript.
23
Illustrator Scripting Guide, Release 0.0.1
The JavaScript and VBScript text frames objects contain specific methods for creating area text frames and path
text frames.
As in the Illustrator application, you can thread area or path text frames.
To thread existing text frames, use the next frame or previous frame property of the text frame object.
Threaded frames make a single story object.
For information on creating or threading text frames, see the chapter in this manual for your scripting language.
While the three kinds of text frames have common characteristics, like orientation, each has type-specific qualities,
as reflected in the text frame object’s properties. For example:
• An area text frame can have rows and columns, which you access through the row count and column count
properties.
• Path text has start T value and end T value properties that indicate where on the path the text begins and ends.
• Area and path text frames are associated with a text path object, which is specified using the text frame object’s
text path property. The text path defines the text frame’s position and orientation (horizontal or vertical) on
the artboard (while the text frame object’s orientation property defines the orientation of text within the
text frame). The text path property is not valid for point text, because point-text position and orientation are
defined completely by the properties of the text frame itself.
Note: A text path is not the same as a path art item. Text paths are associated with path art items that can be accessed
and manipulated to modify the appearance of the associated text frame.
Within a text frame or story, the actual text content can be accessed as any of the following objects:
• characters
• words
• paragraphs
• lines
A line object is all the characters that fit on one line in a text frame or story object.
All text-art items have at least one line of text, defined as a line object.
Text art can have multiple text lines, if the text contains hard line breaks or its characters flow to a new line because
they do not fit in the width of the text art.
Text objects are accessed and identified by collections within the text frame and story objects; for example
Both text frame and story objects have insertion point and text selection properties.
The text frame object’s properties also include the defining features of the text frame, such as:
• The frame width, height, and position
• Whether the frame is hidden or locked
• Whether the text is editable
Note: A line object cannot be created in a script. Your script can create character, paragraph, and word objects.
The various text objects within a text frame or story also are represented collectively by the text range object.
For example, a character is a text range with a length of 1, and a word is a text range that has a space before it.
You can set the content of a text range object by passing a string using the contents property.
Text-style elements, like font, capitalization, and justification, are represented by paragraph attribute
and character attribute objects.
These attribute objects are properties of the paragraph style and character style objects.
The paragraph style and character style objects have apply to and remove methods that allow your script
to assign or remove attributes in a specific paragraph, character, or text range.
You can change the display properties of a text range by applying an appropriate style or providing local overrides of
attributes at the text or paragraph levels:
• character style objects apply to sets of one or more characters. They control character features like font,
alignment, leading, language, and capitalization, which are properties of the character attribute
object.
• paragraph style objects apply to paragraphs. They control paragraph features like first line indent,
left indent, and right indent, which are properties of the paragraph attribute object.
TWELVE
DYNAMIC OBJECTS
Note: Do not confuse variable objects with scripting variables. For details on Illustrator variables, dynamic objects,
and data-driven graphics, see Illustrator Help.
Datasets, which collect variables and their associated dynamic data into one object, are represented in scripting by the
dataset object.
The dataset object provides methods to update and delete dataset objects in your scripts.
27
Illustrator Scripting Guide, Release 0.0.1
THIRTEEN
SYMBOLS
In Illustrator, symbols are art items that are stored in the Symbols panel.
Your scripts can create, delete, and duplicate symbol objects.
When you create symbol objects in your script, Illustrator adds them to the Symbols panel for the target document.
A symbol item is an instance of a symbol object in a document. Each symbol item is linked to its symbol definition,
so changing the definition of a symbol updates all instances of the symbol.
Your script can create, delete, and duplicate symbol items. Symbol items are Illustrator art items; therefore, they can
be treated in the same way as other art items or page items.
You can rotate, resize, select, lock, hide, and perform other operations on symbol items.
29
Illustrator Scripting Guide, Release 0.0.1
FOURTEEN
TRANSFORMATIONS
31
Illustrator Scripting Guide, Release 0.0.1
FIFTEEN
15.1.1 AppleScript
15.1.2 JavaScript
Typically, you run JavaScript scripts from the application’s Scripts menu (File > Scripts) or start-up folder, so there is
no need to launch Illustrator from your script.
Information on launching Illustrator in JavaScript is beyond the scope of this guide.
For details, search for Interapplication Communication or Javascript Messaging Framework in JavaScript Tools Guide.
15.1.3 VBScript
If you have multiple versions of Illustrator installed on the same machine and use the CreateObject method to obtain an
application reference, using “[Link]” creates a reference to the latest Illustrator version. To specifically
target an earlier version, use a version identifier at the end of the string:
33
Illustrator Scripting Guide, Release 0.0.1
Illustrator 10 “[Link].1”
Illustrator CS “[Link].2”
Illustrator CS2 “[Link].3”
Illustrator CS3 “[Link].4”
Illustrator CS4 “[Link].CS4”
Illustrator CS5 “[Link].CS5”
Illustrator CS6 “[Link].CS6”
Illustrator CC “[Link]”
Illustrator CC 2014 “[Link].CC2014”
Illustrator CC 2015 “[Link].CC2015”
Illustrator CC 2017 “[Link].CC2017”
• Use the New operator if you added a reference to the Illustrator type library to the project. For example, the
following line creates a new reference to the Application object:
15.2.1 AppleScript
15.2.2 JavaScript
[Link]();
15.2.3 VBScript
SIXTEEN
To refer to the selected document, use the application object’s current document property in AppleScript or the
active document property in JavaScript or VBScript. Similarly, you can use the document object’s current layer
or active layer property to refer to the selected layer.
There are other types of “active” or “current” object properties, like active dataset or active view. For details,
see the Adobe lllustrator CC 2017 Scripting Reference for your language.
Several objects (besides the application object itself) cannot be obtained from containers or parent objects. Your
script must create these objects directly.
The following objects must be created explicitly:
• CMYK color
• document preset
• EPS save options
• export options AutoCAD
• export options Flash
• export options GIF
• export options JPEG
• export options Photoshop
• export options PNG8
• export options PNG24
• export options SVG
• export options TIFF
• file
• folder
• gradient color
35
Illustrator Scripting Guide, Release 0.0.1
• gray color
• Illustrator save options
• ink
• ink info
• lab color
• matrix
• MXG save options
• no color
• open options
• open options AutoCAD
• open options FreeHand
• open options PDF
• open options Photoshop
• paper info
• Pattern color
• PDF save options
• PPD file
• PPD file info
• print color management options
• print color separation options
• print coordinate options
• printer
• printer info
• print flattener options
• print font options
• print job options
• print options
• print page marks options
• print paper options
• print postscript options
• raster effect options
• rasterize options
• screen
• screen spot function
• RGB color
• spot color
• tracing options
The file and folder objects are Adobe ExtendScript devices designed to provide platform-independent access to the
underlying file system. For information on using these objects, see JavaScript Tools Guide.
For information on creating an object explicitly, see the chapter for your scripting language.
Most collection objects must be obtained from a container. For example, a path items collection object can be
contained by a document object or a layer object; to obtain an object in a path items collection, refer to either
containing of these objects. For example, see the language-specific sections below.
16.3.1 AppleScript
16.3.2 JavaScript
documents[0].pathItems[1]
documents[0].layers[0].pathItems[0]
16.3.3 VBScript
Documents(1).PathItems(1)
Documents(1).Layers(1).PathItems(1)
For more examples of collection-item containers, see the document object Elements table in Adobe lllustrator CC 2017
Scripting Reference: AppleScript or the Properties table in Adobe lllustrator CC 2017 Scripting Reference: JavaScript
or Adobe lllustrator CC 2017 Scripting Reference: VBScript. A diagram of the lllustrator CC 2017 object model is in
The Illustrator Scripting Object Model.
Sometimes, you want to write scripts that act on the currently selected object or objects. For example, you might want
to apply formatting to selected text or change a selected path’s shape.
To select text, use the select command or method of the text range object.
You can select an art object (like graph items, mesh items, raster items, and symbol items) by setting its selected
property to true. (In AppleScript, selected is a property of the page items object.)
To refer to all currently selected objects in a document, use the document object’s selection property. To work with
the objects in the selection array, you must determine their type, so you will know which properties and methods or
commands you can use with them. In JavaScript and VBScript, each artwork object type has a read-only typename
property that you can use to determine the object’s type. In AppleScript, use the class property.
Several objects can be renamed; that is, their name property is writeable. The following types of objects can be sorted
alphabetically in the corresponding Illustrator panel. If a script modifies the name of such an object, references to that
object by index can become invalid.
• Brush
• Gradient
• Graphic Style
• Pattern
• Swatch
• Symbol
• Variable
SEVENTEEN
MEASUREMENT UNITS
Illustrator uses points as the unit of measurement for almost all distances. One inch equals 72 points. The exception
is values for properties like kerning, tracking, and the aki properties (used for Japanese text composition), which
use em units. (See Em space units)
Illustrator uses points when communicating with your scripts regardless of the current ruler units. If your script depends
on adding, subtracting, multiplying, or dividing specific measurement values for units other than points, it must perform
any unit conversions needed to represent your measurements as points. For example, to use inches for coordinates or
measurement units, you must multiply all inch values by 72 when entering the values in your script.
The following table shows conversion formulas for various units of measurement:
JavaScript provides the UnitValue object type, which offers unit-conversion utilities. For details, see JavaScript Tools
Guide
Values that use em units instead of points are measured in thousandths of an em.
An em is proportional to the current font size.
For example, in a 6-point font, 1 em equals 6 points; in a 10-point font, 1 em equals 10 points.
In a 10-point font, a kerning value of 20 em units is equivalent to
39
Illustrator Scripting Guide, Release 0.0.1
EIGHTEEN
Illustrator uses simple, two-dimensional geometry in the form of points to record the position of page item objects in
a document. Every page item object in a document has a position property that defines a fixed point as a pair of page
coordinates in the format [x, y]. The fixed point is the top-left corner of the object’s bounding box.
For information on the types of objects that comprise the page items collection, see “The artwork tree” on
A point is designated by a pair of coordinates:
• The horizontal position, x
• The vertical position, y
You can see these coordinates in the Info panel when you select or create an object in Illustrator.
For the artboard, the default coordinate origin, (0,0), is the top-left corner, reflected in the ruler origin property of the
artboard object. X coordinate values increase from left to right, and Y values increase from top to bottom. This changed
in the CS5 release; to maintain script compatability, a document created by a script still uses the older system, with the
origin at the bottom left of the artboard, and the Y value increasing from bottom to top. The page origin property of a
document object defines the bottom-left corner of the printable region of the document as a fixed point.
Each page item object has width and height properties. The maximum value allowed for the width or height of a page
item is 16348 points.
Every page item object has three properties that use fixed rectangles to describe the object’s overall extent:
• The geometric bounds of a page item are the rectangular dimensions of the object’s bounding box, excluding
stroke width.
• The visible bounds of a page item are the dimensions of the object, including any stroke widths.
• The control bounds define the rectangular dimensions of the object, including in and out control points.
The following figure illustrates these properties, using JavaScript naming conventions.
41
Illustrator Scripting Guide, Release 0.0.1
NINETEEN
Paths are represented in the Illustrator DOM by the path item object. Path items include all artwork that contains
paths, such as rectangles, ellipses, and polygons, as well as freeform paths.
A freeform path consists of a series of path points. A path point can be specified in two ways:
• As an array of x and y page coordinates.
• As a path point object, which defines an anchor point and two direction points or handles that define the path
segment’s curve:
For details, samples, and information on creating shapes, see the chapter for your scripting language.
43
Illustrator Scripting Guide, Release 0.0.1
TWENTY
USER-INTERACTION LEVELS
When user feedback is required, an application typically presents a dialog. This is called user interaction. It is useful
and expected when you are directly interacting with the application; however, when a script is interacting with an
application, a dialog brings the execution of the script to a halt until the dialog is dismissed. This can be a serious
problem in an automation environment, where there is no one present to deal with dialogs.
The application object contains a user interaction level property that allows you to control the level of in-
teraction allowed during script execution. You can suppress interaction in an automation environment or allow some
interaction where scripts are being used in a more interactive fashion.
20.1 AppleScript
Using AppleScript, it is possible to send commands from one machine to another, so additional types of interaction are
possible. In AppleScript:, there are four possible values for the user interaction level property:
The four values allow you to control interaction based on the source of the script commands. For example, if the
application is acting as a server for remote users, it would be difficult for a remote user to dismiss a dialog, but it would
be no problem for someone sitting in front of the machine. In this case, an interaction level of interact with local would
prevent dialogs from halting remote scripts but would allow dialogs to be presented for local scripts.
20.2 JavaScript
In JavaScript, there are two possible values for the [Link] property:
45
Illustrator Scripting Guide, Release 0.0.1
20.3 VBScript
In VBScript, there are two possible values for the UserInteractionLevel property of the Application object:
TWENTYONE
Using the print options scripting feature, you can capture and automate parts of your print workflow. Scripting
exposes the full capabilities of Illustrator printing, some of which may not be accessible through the application’s user
interface.
Illustrator supports at most one print session at a time, because of limits in the current printing architecture.
The document object’s print command or method takes one optional parameter, which allows you to specify a print
options object.
The print options object allows you to define print settings like PPD, PostScript options, paper options, and color-
management options. The print options object also has a print preset property, which allows you to specify a
preset to define your print job.
When defining the properties of a print options object, you can find out which printers, PPDs, print presets, and
other items are available by using the application object’s read-only “list” properties, such as the printer list,
PPD file list, and print presets list properties.
47
Illustrator Scripting Guide, Release 0.0.1
TWENTYTWO
Several extended sample scripts are in the /Scripting/Sample Scripts/ folder in your Illustrator CC 2017 instal-
lation directory.
For information about individual classes, objects, properties, commands, and parameters, as well as script samples that
demonstrate how to use many of these items, see asobjref/applescript-object-reference.
You also can view the lllustrator CC 2017 dictionary from the Script Editor application; see Viewing the AppleScript
object model
If you do not understand the concepts and terms used in this chapter, read Adobe Introduction to Scripting.
49
Illustrator Scripting Guide, Release 0.0.1
TWENTYTHREE
The traditional first project in any programming language is displaying the message “Hello World!” In this example,
you create a new Illustrator document, then add a text frame containing this message. Follow these steps:
In a default Mac OS installation, Script Editor is in /Applications/AppleScript/Script Editor/.
If you cannot find the Script Editor application, you must reinstall it from your Mac OS system CD.
1. Open Script Editor.
2. Enter the following script:
Tip: To add the script to the Illustrator Scripts menu (File > Scripts), save the script in the Scripts folder. The script
will appear on the menu the next time you start Illustrator. For details, see Installing scripts in the Scripts menu.
Next, we create a new script that makes changes to the Illustrator document you created with your first script. Our
second script demonstrates how to:
• Get the active document.
• Get the width of the active document.
• Resize the text frame to match the document’s width.
If you already closed the Illustrator document, run your first script again to create a new document.
Follow these steps:
1. In Script Editor, choose File > New to create a new script.
51
Illustrator Scripting Guide, Release 0.0.1
TWENTYFOUR
OBJECT REFERENCES
In AppleScript, Illustrator returns object references by index position or name. For example, this is a reference to the
first path in layer 2
An object’s index position may change when other objects are created or deleted. For example, when a new path item
is created on layer 2, the new path item becomes path item 1 of layer 2 of document 1.
This new object displaces the original path item, forcing the original to index position 2; therefore, any references made
to path item 1 of layer 2 of document 1 refer to the new object. This method of applying index numbers
assures that lowest index number refers to the object that was worked on most recently.
Consider the following sample script:
This script does not select both the rectangle and the star, as intended; instead, it selects only the star. Try running the
script with the Event Log window open, to observe the references returned from Illustrator for each consecutive make
command. (Choose Event Log at the bottom of the Script Editor window.) Notice that both commands return the same
object reference: path item 1 of layer 1 of document 1; therefore, the last line resolves to
This example illustrates the need to uniquely identify objects in AppleScript scripts. We recommend that you assign
names or variables to objects you need to access at a later time, as there is no guarantee you are accessing the objects
53
Illustrator Scripting Guide, Release 0.0.1
In the following script, the pageItemRef variable does not necessarily refer to the same object as in the previous script,
because this script includes a reference to a layer:
-- Get reference for first page item of layer 1 of document 1
tell application "Adobe Illustrator"
set pageItemRef to page item 1 of layer 1 of document 1
end tell
When the user makes a selection in a document, the selected objects are stored in the document’s selection property.
To access all selected objects in the active document:
tell application "Adobe Illustrator"
set myDoc to current document
set selectedObjects to selection of myDoc
end tell
Depending on what is selected, the selection property value can be an array of any type of art objects. To get or
manipulate the properties of the selected art items, you must retrieve the individual items in the array. To find out an
object’s type, use the class property.
The following sample gets the first object in the array, then displays the object’s type:
tell application "Adobe Illustrator"
set myDoc to current document
set selectedObjects to selection of myDoc
set topObject to item 1 of selectedObjects
display dialog (class of topObject)
end tell
The first object in a selection array is the selected object that was last added to the page, not the last object selected.
TWENTYFIVE
To create a text frame of a specific type in AppleScript, use the kind property of the text frame object
As in the Illustrator application, you can thread area text frames or path text frames.
To thread existing text frames, use the next frame or previous frame property of the text frame object.
When copying the following script to your script editor, place the value of the contents property on one line. The
long-line character (¬) is not valid within a string value.
57
Illustrator Scripting Guide, Release 0.0.1
Threaded frames make a single story object. To observe this, run the following AppleScript after running the script
above.
display dialog ("There are " & (count(text frames of current document)) & " text frames.
˓→")
display dialog("There are " & (count(stories of current document)) & " stories.")
TWENTYSIX
26.1 Paths
To create line or a freeform path, specify a series of path points, as a series of x-y coordinates or path point objects.
Using x-y coordinates limits the path to straight segments. To created a curved path, you must create path point
objects. A path can comprise a combination of page coordinates and path point objects.
To specify a path using page-coordinate pairs, use the entire path property of the path items object. The following
script specifies three pairs of x-y coordinates, to create a path with three points:
To create a path point object, you must define three values for the point.
• A fixed anchor point, which is the point on the path.
• A pair of direction points— left direction and right direction —which allow you to control the path
segment’s curve.
You define each property as an array of page coordinates in the format [x, y]:
• If all three properties of a path point object have the same coordinates, and the properties of the next path
point in the line are equal to each other, you create a straight-line segment.
• If two or more properties in a path point object have different values, the segment connected to the point is
curved.
59
Illustrator Scripting Guide, Release 0.0.1
To create a path or add points to an existing path using path point objects, create a path item object, then add the
path points as child objects in the path item:
end tell
The following script sample creates a path with three points, by combining the entire path property with a path point
object
26.2 Shapes
To create a shape, you use the object that corresponds to the shape’s name (like ellipse, rectangle, or polygon),
and use the object’s properties to specify the shape’s position, size, and other information like the number of sides in a
polygon.
Remember:
• The scripting engine processes all measurements and page coordinates as points. For details, see Measurement
Units.
• x and y coordinates are measured from the bottom-left corner of the document, as indicated in the Info panel in
the Illustrator application. For details, see Page-item positioning and dimensions.
Properties for path-item shapes use the “write-once” access status, which indicates that the property is writeable only
when the object is created. For existing path-item objects, the properties are read-only properties whose values cannot
be changed.
26.2. Shapes 61
Illustrator Scripting Guide, Release 0.0.1
TWENTYSEVEN
The Perspective Grid is a new feature in lllustrator CC 2017 that enables you to create and manipulate art in a spatial
environment using established laws of perspective. Enable Perspective Grid using the View > Perspective Grid menu
or the perspective tools in the toolbar.
The SDK provides an API for working with the perspective grid programmatically, and your scripts have some access
to this API. A script can:
• Set a the default grid parameters using preset values.
• Show or hide the grid.
• Set the active plane.
• Draw an object in perspective on the active plane.
• Bring an object into perspective.
Illustrator provides default grid-parameter presets for one-point, two-point, and three-point perspectives. The presets
are named "[1P-NormalView]", "[2P-NormalView]", and "[3P-NormalView]".
The script shows how to select the two-point perspective preset programmatically:
You can create new perspective presets, export presets to files, and import presets from files. These scripts shows how
to export and import presets:
63
Illustrator Scripting Guide, Release 0.0.1
For a one-point perspective grid, only the left and floor plane are valid.
This script sets the active perspective plane to the left plane:
When the Perspective Grid is on, drawing methods allow you to draw or operate on objects in perspective. This script
creates a new document, shows a two-point perspective grid, and draws art objects on the left plane
scale rectRef horizontal scale 200 vertical scale 200 about top left with␣
˓→transforming objects
end tell
end tell
If an art object is not in perspective, use the bringInPerspective() method to bring it into perspective and place it
on a plane.
This script creates a new document, draws an art object, and brings it into perspective on a three-point perspective grid:
end tell
end tell
TWENTYEIGHT
Several extended sample scripts are in the /Scripting/Sample Scripts/ folder in your lllustrator CC 2017 instal-
lation directory.
For information about individual classes, objects, properties, methods, and parameters, as well as script samples that
demonstrate how to use many of these items, see Adobe lllustrator CC 2017 Scripting Reference: JavaScript, in the /
Scripting/Documentation/ folder in your lllustrator CC 2017 installation directory. You also can use the Illustrator
dictionary, which you access from the Object Model Viewer in the ESTK. For information on using the ExtendScript
Toolkit and the Object Model Viewer, see Viewing the JavaScript object model.
If you do not understand the concepts and terms used in this chapter, read Adobe Introduction to Scripting.
67
Illustrator Scripting Guide, Release 0.0.1
TWENTYNINE
The traditional first project in any programming language is displaying the message “Hello World!” In this example,
you create a new Illustrator document, then add a text frame containing this message. Follow these steps:
For information on locating the ExtendScript Toolkit, see Viewing the JavaScript object model.
1. Using any text editor (including Adobe^ InDesign® or the ESTK), enter the following text:
//Hello World!
var myDocument = [Link]();
//Create a new text frame and assign it to the variable "myTextFrame"
var myTextFrame = [Link]();
// Set the contents and position of the text frame
[Link] = [200,200];
[Link] = "Hello World!"
Tip: To add the script to the Illustrator Scripts menu (File > Scripts), save the script in the Scripts folder. The script
will appear on the menu the next time you start Illustrator. For details, see Installing scripts in the Scripts menu.
Next, we create a new script that makes changes to the Illustrator document you created with your first script. Our
second script demonstrates how to:
• Get the active document.
• Get the width of the active document.
• Resize the text frame to match the document’s width.
If you already closed the Illustrator document, run your first script again to create a new document.
Follow these steps:
69
Illustrator Scripting Guide, Release 0.0.1
THIRTY
When you work with methods that have multiple parameters, you may omit optional parameters at the end of the
parameter list, but you may not omit parameters in the middle of the list. If you do not want to specify a particular
parameter in the middle of the list, you must insert the value undefined to use the parameter’s default value. For
example, the following definition describes the rotate() method for an art object.
rotate
(angle
[,changePositions]
[,changeFillPatterns]
[,changeFillGradients]
[,changeStrokePattern]
[,rotateAbout])
In the definition, taken from Adobe lllustrator CC 2017 Scripting Reference: JavaScript, optional parameters are en-
closed in square brackets ( [] ).
To rotate the object 30 degrees and change the fillGradients, you would use the following script statement
You need to specify undefined for the changePositions and changeFillPatterns parameters. You do not have
to specify anything for the two optional parameters following changeFillGradients, since they are at the end of the
parameter list.
71
Illustrator Scripting Guide, Release 0.0.1
THIRTYONE
When you write a script, you must first decide which file, or document, the script should act on. Through the
application object, the script can create a new document, open an existing document, or act on a document that
is already open.
The script can create new objects in the document, operate on objects that the user selected, or operate on objects
in one of the object collections. The following sections illustrate various techniques for accessing, referencing, and
manipulating Illustrator objects.
To obtain a reference to a specific object, you need to navigate the containment hierarchy. Because all JavaScript
scripts are executed from within the Illustrator application, however, a specific reference to the application object is not
required. For example, to assign the active document in Illustrator to the variable frontMostDocument, you could
reference the activeDocument property of the application object, as follows
It is permissible to use the application object in a reference. To reference the application object, use the app
global variable. The following two statements appear identical to the JavaScript engine:
All open documents, as well as the objects in a document, are collected into collection objects for the object type. A
collection object contains an array of the objects that you can access by index or name. The collection object takes the
plural form of the object name. For example, the collection object for the document object is documents.
The following script sample gets all graphic style objects in the graphic styles collection; that is, it gets all
graphic styles available to the active document
73
Illustrator Scripting Guide, Release 0.0.1
All numeric collection references in JavaScript are zero-based: the first object in the collection has the index [0].
As a rule, JavaScript index numbers do not shift when you add an object to a collection. There is one exception:
documents[0 is always the active or frontmost document.
To access the first style in a graphic styles collection, you can use the variable declared in the previous script
sample, or you can use the containment hierarchy to refer to the collection:
• Using the myStyles variable
The following statements assign the name of the first graphic style in the collection to a variable. You can use these
statements interchangeably.
To get the total number of objects in a collection, use the length property:
alert ( [Link] );
The index of the last graphic style in the collection is [Link] - 1 (-1 because the collection starts the
index count at 0 and the length property counts from 1):
Note that an expression representing the index value is enclosed in square brackets ( [] ) as well as quotes.
If you know the name of an object, you can access the object in the collections using the name surrounded by square
brackets; for example:
Each element in the collection is an object of the desired type, and you can access its properties through the collection.
For example, to get an object’s name, use the name property:
To apply lastStyle to the first pageItem in the document, use its applyTo() method:
[Link]( [Link][0] );
You can use a script to create new objects. To create objects that are available from collection objects, or containers,
use the container object’s add() method
Some object types are not available from containers. To create an object of this type, define a variable, then use the new
operator with an object constructor to assign an object as the value. For example, to create a new CMYKColor object
using the variable name myColor:
When the user makes a selection in a document, the selected objects are stored in the document’s selection property.
To access all selected objects in the active document:
The selection property value can be an array of any type of art objects, depending on what types of objects are
selected. To get or manipulate the properties of the selected art items, you must retrieve the individual items in the
array. To find out an object’s type, use the typename property.
The following sample gets the first object in the array, then displays the object’s type
The first object in a selection array is the selected object that was last added to the page, not the last object selected.
THIRTYTWO
To create a text frame of a specific type in JavaScript, use the kind property of the text frame object:
As in the Illustrator application, you can thread area text frames or path text frames.
To thread existing text frames, use the nextFrame or previousFrame property of the text frame object.
When copying the following script to the ESTK, place the value of the contents property on one line:
77
Illustrator Scripting Guide, Release 0.0.1
Threaded frames make a single story object. To observe this, run the following JavaScript after running the script
above.
THIRTYTHREE
33.1 Paths
To create line or a freeform path, specify a series of path points, as a series of x-y coordinates or path point objects.
Using x-y coordinates limits the path to straight segments. To created a curved path, you must create pathPoint
objects. Your path can comprise a combination of page coordinates and pathPoint objects.
To specify a path using page-coordinate pairs, use the setEntirePath() property of the pathItems object. The
following script specifies three pairs of x-y coordinates, to create a path with three points
To create a pathPoint object, you must define three values for the point.
• A fixed anchor point, which is the point on the path.
• A pair of direction points— left direction and right direction —which allow you to control the path
segment’s curve.
You define each property as an array of page coordinates in the format [x, y]:
• If all three properties of a pathPoint object have the same coordinates, and the properties of the next pathPoint
in the line are equal to each other, you create a straight-line segment.
• If two or more properties in a pathPoint object have different values, the segment connected to the point is
curved.
To create a path or add points to an existing path using pathPoint objects, create a pathItem object, then add the
path points as child objects in the pathItem:
79
Illustrator Scripting Guide, Release 0.0.1
33.2 Shapes
To create a shape, you use the object that corresponds to the shape’s name (like ellipse, rectangle, or polygon),
and use the object’s properties to specify the shape’s position, size, and other information like the number of sides in a
polygon.
Remember:
• All measurements and page coordinates are processed as points by the scripting engine. For details, see Mea-
surement Units.
• x and y coordinates are measured from the bottom-left corner of the document, as indicated in the Info panel in
the Illustrator application. For details, see Page-item positioning and dimensions.
The sample uses the pathItems object’s rectangle() method to create a rectangle with these properties:
• The top of the rectangle is 2 inches (144 points) from the bottom edge of the page.
• The left edge is 2 inches (144 points) from the left edge of the page.
• The rectangle is 1 inch (72 points) wide and 3 inches (216 points) long.
The sample uses the polygon() method to create a polygon with these properties:
• The center point of the object is inset is 2 inches (144 points) on the horizontal axis and 4 inches (288 points) on
the vertical axis.
• The length of the radius from the center point to each corner is 1 inch (72 points).
• The polygon has 7 sides.
33.2. Shapes 81
Illustrator Scripting Guide, Release 0.0.1
THIRTYFOUR
The Perspective Grid is a new feature in lllustrator CC 2017 that enables you to create and manipulate art in a spatial
environment using established laws of perspective. Enable Perspective Grid using the View > Perspective Grid menu
or the perspective tools in the toolbar.
The SDK provides an API for working with the perspective grid programmatically, and your scripts have some access
to this API. A script can:
• Set a the default grid parameters using preset values.
• Show or hide the grid.
• Set the active plane.
• Draw an object in perspective on the active plane.
• Bring an object into perspective.
Illustrator provides default grid-parameter presets for one-point, two-point, and three-point perspectives. The presets
are named "[1P-NormalView]", "[2P-NormalView]", and "[3P-NormalView]".
The script shows how to select the two-point perspective preset programmatically:
You can create new perspective presets, export presets to files, and import presets from files. These scripts shows how
to export and import presets:
83
Illustrator Scripting Guide, Release 0.0.1
For a one-point perspective grid, only the left and floor plane are valid.
This script sets the active perspective plane:
When the Perspective Grid is on, drawing methods allow you to draw or operate on objects in perspective. This script
creates a new document, shows a two-point perspective grid, and draws art objects on the left plane
If an art object is not in perspective, use the bringInPerspective() method to bring it into perspective and place it
on a plane.
This script creates a new document, draws an art object, and brings it into perspective on a three-point perspective grid:
//Draw ellipse
var myellipse = [Link](60, -60, 30, 30, false, true);
//Draw polygon
var mypoly = [Link](-105, 105, 15, 7, false);
//Draw star
var mystar = [Link](-135, 135, 15, 10, 6, false);
THIRTYFIVE
Several extended sample scripts are in the :Scripting:Sample Scripts folder in your Illustrator CC 2017 installation
directory.
For information about individual classes, objects, properties, commands, and parameters, as well as script samples
that demonstrate how to use many of these items, see Adobe lllustrator CC 2017 Scripting Reference: VBScript, in
the /Scripting/Documentation/ folder in your lllustrator CC 2017 installation directory. You also can view the
lllustrator CC 2017 dictionary from the Script Editor application; see Viewing the VBScript object model.
If you do not understand the concepts and terms used in this chapter, read Adobe Introduction to Scripting.
87
Illustrator Scripting Guide, Release 0.0.1
THIRTYSIX
The traditional first project in any programming language is displaying the message “Hello World!” In this example,
you create a new Illustrator document, then add a text frame containing this message. Follow these steps:
1. Start any text editor (for example, Notepad).
2. Type the following code:
3. Save the file as text-only in a folder of your choice, using the file extension .vbs.
4. To test the script, do one of the following:
• Double-click the file.
• Start Illustrator, choose File > Scripts > Other Scripts, and navigate to and run your script file.
Tip: To add the script to the Illustrator Scripts menu (File > Scripts), save the script in the Scripts folder. The script
will appear on the menu the next time you start Illustrator. For details, see Installing scripts in the Scripts menu.
In general, when you launch a VBScript script from the Scripts menu, any msgBox dialogs will not display correctly.
Next, we create a new script that makes changes to the Illustrator document you created with your first script. Our
second script demonstrates how to:
• Get the active document.
• Get the width of the active document.
• Resize the text frame to match the document’s width.
89
Illustrator Scripting Guide, Release 0.0.1
If you already closed the Illustrator document, run your first script again to create a new document.
Follow these steps:
1. Copy the following script into your text editor, and save the file:
THIRTYSEVEN
When you write a script, you must first decide which file, or Document, the script should act on. Through the
Application object, the script can create a new document, open an existing document, or act on a document that
is already open.
The script can create new objects in the document, operate on objects that the user selected, or operate on objects in
one of the object collections. The following sections illustrate techniques for accessing, referencing, and manipulating
Illustrator objects
Generally, to obtain a reference to a specific object, you can navigate the containment hierarchy. For example, to use
the myPath variable to store a reference to the first PathItem in the second layer of the active document
In the script below, the variable pageItemRef will not necessarily refer to the same object as the above script, since
this script includes a reference to a layer:
VBScript indexes start at 1 for object collections; however, VBScript allows you to specify whether array indexes start
at 1 or 0. For information on specifying the index start number for arrays, see any VBScript textbook or tutorial.
91
Illustrator Scripting Guide, Release 0.0.1
You can use a script to create new objects. To create objects that are available from collection objects, use the collection
object’s Add method:
Some collection objects do not have an Add method. To create an object of this type, define a variable and use the
CreateObject method. For example, the following code creates a new CMYKColor object using the variable name
newColor
When the user makes a selection in a document, the selected objects are stored in the document’s selection property.
To access all selected objects in the active document
Depending on what is selected, the selection property value can be an array of any type of art objects. To get or
manipulate the properties of the selected art items, you must retrieve the individual items in the array. To find out an
object’s type, use the typename property.
The following sample gets the first object in the array, then displays the object’s type
The MsgBox method does not display a dialog when the script is run from the Illustrator Scripts menu (File > Scripts).
The first object in a selection array is the selected object that was last added to the page, not the last object selected.
THIRTYEIGHT
To create a text frame of a specific type in VBScript, use the TextFrames method that corresponds to the type of frame
you want to create::
As in the Illustrator application, you can thread area text frames or path text frames.
To thread existing text frames, use the NextFrame or PreviousFrame property of the TextFrames object.
When copying the following script to your script editor, place the value of the Contents property on one line. The
long-line character (_) is not valid within a string value.
[Link]()
93
Illustrator Scripting Guide, Release 0.0.1
Threaded frames make a single story object. To observe this, run the following VBScript after running the script above.
THIRTYNINE
39.1 Paths
To create line or a freeform path, specify a series of path points, as a series of x-y coordinates or PathPoint objects.
Using x-y coordinates limits the path to straight segments. To created a curved path, you must create PathPoint
objects. A path can comprise a combination of page coordinates and PathPoint objects.
To specify a path using page-coordinate pairs, use the entire path property of the PathItems object. The following
script specifies three pairs of x-y coordinates, to create a path with three points
To create a PathPoint object, you must define three values for the point.
• A fixed anchor point, which is the point on the path.
• A pair of direction points— left direction and right direction —which allow you to control the path
segment’s curve.
You define each property as an array of page coordinates in the format (Array (x,y)):
• If all three properties of a PathPoint object have the same coordinates, and the properties of the next PathPoint
in the line are equal to each other, you create a straight-line segment.
• If two or more properties in a PathPoint object hold different values, the segment connected to the point is
curved.
To create a path or add points to an existing path using PathPoint objects, create a PathItem object, then add the
path points as child objects in the PathItem
95
Illustrator Scripting Guide, Release 0.0.1
39.2 Shapes
To create a shape, you use the object that corresponds to the shape’s name (like ellipse, rectangle, or polygon),
and use the object’s properties to specify the shape’s position, size, and other information like the number of sides in a
polygon.
Remember:
• The scripting engine processes all measurements and page coordinates as points. For details, see Measurement
Units.
• x and y coordinates are measured from the bottom-left corner of the document, as indicated in the Info panel in
the Illustrator application. For details, see Page-item positioning and dimensions.
39.2. Shapes 97
Illustrator Scripting Guide, Release 0.0.1
FORTY
Properties that use enumeration values in VBScript use a numeral rather than a text value. For example, the Orientation
property of the TextFrame object specifies whether text content in the text frame is horizontal or vertical. The property
uses the aiTextOrientation enumeration, which has two possible values, aiHorizontal and aiVertical.
To find the numeral values of enumerations, use either of the following:
• The object browser in your scripting editor environment. See Viewing the VBScript object model.
• The Adobe lllustrator CC 2017 Scripting Reference: VBScript, which lists the numeral values directly after the
constant value in the “Enumerations” chapter at the end of the book. The following example is from that table:
Generally, it is considered good scripting practice to place the text value in a comment following the numeral value, as
in the following sample statement:
99
Illustrator Scripting Guide, Release 0.0.1
FORTYONE
The Perspective Grid is a new feature in lllustrator CC 2017 that enables you to create and manipulate art in a spatial
environment using established laws of perspective. Enable Perspective Grid using the View > Perspective Grid menu
or the perspective tools in the toolbar.
The SDK provides an API for working with the perspective grid programmatically, and your scripts have some access
to this API. A script can:
• Set a the default grid parameters using preset values.
• Show or hide the grid.
• Set the active plane.
• Draw an object in perspective on the active plane.
• Bring an object into perspective.
Illustrator provides default grid-parameter presets for one-point, two-point, and three-point perspectives. The presets
are named "[1P-NormalView]", "[2P-NormalView]", and "[3P-NormalView]".
The script shows how to select the two-point perspective preset programmatically:
You can create new perspective presets, export presets to files, and import presets from files. These scripts shows how
to export and import presets:
101
Illustrator Scripting Guide, Release 0.0.1
For a one-point perspective grid, only the left and floor plane are valid.
This script sets the active perspective plane to the left plane:
When the Perspective Grid is on, drawing methods allow you to draw or operate on objects in perspective. This script
creates a new document, shows a two-point perspective grid, and draws art objects on the left plane
If an art object is not in perspective, use the bringInPerspective() method to bring it into perspective and place it
on a plane.
This script creates a new document, draws an art object, and brings it into perspective on a three-point perspective grid
FORTYTWO
SCRIPTING CONSTANTS
This chapter lists and describes the enumerations defined for use with Illustrator JavaScript properties and methods.
42.1 AlternateGlyphsForm
Value Description
[Link] Defaultform
[Link] Traditional
[Link] Expert
AlternateGlyphsForm.JIS78FORM JIS78FORM
AlternateGlyphsForm.JIS83FORM JIS83FORM
[Link] Half Width
[Link] Third Width
[Link] Quarter Width
[Link] Full Width
[Link] Proportional Width
AlternateGlyphsForm.JIS90FORM JIS90FORM
AlternateGlyphsForm.JIS04FORM JIS04FORM
Example
[Link][i].[Link] ==␣
˓→[Link];
[Link][i].[Link] ==␣
˓→[Link]
105
Illustrator Scripting Guide, Release 0.0.1
42.2 AntiAliasingMethod
Value Description
[Link] No antialiasing is allowed.
[Link] Optimize for the art object.
[Link] Optimize for the type object.
42.3 ArtClippingOption
Value Description
[Link] Output size is the size of the artwork.
[Link] Output size is the size of the artboard.
[Link] Output size is the size of the crop area.
42.4 AutoCADColors
Value Description
AutoCADColors.Max8Colors Max 8 CColors
AutoCADColors.Max16Colors Max 16 Colors
AutoCADColors.Max256Colors Max 25 6Colors
[Link] True Colors
42.5 AutoCADCompatibility
Value Description
AutoCADCompatibility.AutoCADRelease13 Release 13
AutoCADCompatibility.AutoCADRelease18 Release 18
AutoCADCompatibility.AutoCADRelease14 Release 14
AutoCADCompatibility.AutoCADRelease21 Release 21
AutoCADCompatibility.AutoCADRelease15 Release 15
AutoCADCompatibility.AutoCADRelease24 Release 24
42.6 AutoCADExportFileFormat
Value Description
[Link] DXF
[Link] DWG
42.7 AutoCADExportOption
Value Description
[Link] Preserve Appearance
[Link] Maximize Editability
42.8 AutoCADGlobalScaleOption
Value Description
[Link] Original Size
[Link] Scale by Value
[Link] Fit Artboard
42.9 AutoCADRasterFormat
Value Description
[Link] PNG
[Link] JPEG
42.10 AutoCADUnit
Value Description
[Link] Points
[Link] Picas
[Link] Inches
[Link] Millimeters
[Link] Centimeters
[Link] Pixels
42.11 AutoKernType
Value Description
[Link] None
[Link] Auto
[Link] Optical
[Link] Metrics
42.12 AutoLeadingType
Value Description
[Link] Bottom to Bottom
[Link] Top to Top
42.13 BaselineDirectionType
Value Description
[Link] Standard
[Link] Vertical Rotated
[Link] TateChuYoko
42.14 BlendAnimationType
Value Description
[Link] In Build
[Link] None
[Link] In Sequence
42.15 BlendModes
Value Description
[Link] Color
[Link] Color Burn
[Link] Color Dodge
[Link] Darken
[Link] Difference
[Link] Exclusion
[Link] Hard Light
[Link] Hue
[Link] Lighten
[Link] Luminosity
[Link] Multiply
[Link] Normal
[Link] Overlay
[Link] Saturation
[Link] Screen
[Link] Soft Light
42.16 BlendsExpandPolicy
Value Description
[Link] Automatically convert blends
[Link] Rasterize blends
42.17 BurasagariTypeEnum
Value Description
[Link] Forced
[Link] None
[Link] Standard
42.18 CaseChangeType
Value Description
[Link] Lowercase ("hello world")
[Link] Sentence case ("Hello world")
[Link] Title case ("Hello World")
[Link] Uppercase ("HELLO WORLD")
42.19 ColorConversion
Value Description
[Link] Color Conversion Repurpose
[Link] Color Conversion to Dest
[Link] None
42.20 ColorConvertPurpose
The purpose of color conversion using the ConvertSampleColor method of the Application class.
Value Description
[Link] Default
[Link] Export
[Link] Preview
[Link] Dummy
42.21 ColorDestination
Destination profile
Value Description
[Link] Doc CMYK
[Link] Doc RGB
[Link] Profile
[Link] Working CMYK
[Link] Working RGB
[Link] None
42.22 ColorDitherMethod
The method used to dither colors in exported GIF and PNG8 images.
Value Description
[Link] Diffusion
[Link] Noise
[Link] No Reduction
[Link] Pattern Dither
42.23 ColorModel
Value Description
[Link] Process
[Link] Registration
[Link] Spot
42.24 ColorProfile
Value Description
[Link] Include All Profile
[Link] Include Dest Profile
[Link] Include RGB Profile
[Link] Leave Profile Unchanged
[Link] None
42.25 ColorReductionMethod
The method used to reduce the number of colors in exported GIF and PNG8 images.
Value Description
[Link] Adaptive
[Link] Selective
[Link] Perceptual
[Link] Web
42.26 ColorType
Value Description
[Link] Cmyk
[Link] Gradient
[Link] Gray
[Link] Pattern
[Link] Rgb
[Link] Spot
[Link] None
42.27 Compatibility
The version of the Illustrator file to create when saving an EPS or Illustrator file
Value Description
Compatibility.ILLUSTRATOR8 Illustrator 8
Compatibility.ILLUSTRATOR9 Illustrator 9
Compatibility.ILLUSTRATOR10 Illustrator 10
Compatibility.ILLUSTRATOR11 Illustrator 11
Compatibility.ILLUSTRATOR12 Illustrator 12
Compatibility.ILLUSTRATOR13 Illustrator 13
Compatibility.ILLUSTRATOR14 Illustrator 14
Compatibility.ILLUSTRATOR15 Illustrator 15
Compatibility.ILLUSTRATOR16 Illustrator 16
Compatibility.ILLUSTRATOR17 Illustrator 17
Compatibility.ILLUSTRATOR19 Illustrator 19
Compatibility.JAPANESEVERSION3 Japanese Version 3
42.28 CompressionQuality
Value Description
CompressionQuality.AUTOMATICJPEG2000HIGH todo
CompressionQuality.AUTOMATICJPEG2000LOSSLESS todo
CompressionQuality.AUTOMATICJPEG2000LOW todo
CompressionQuality.AUTOMATICJPEG2000MAXIMUM todo
CompressionQuality.AUTOMATICJPEG2000MEDIUM todo
CompressionQuality.AUTOMATICJPEG2000MINIMUM todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
CompressionQuality.JPEG2000HIGH todo
CompressionQuality.JPEG2000LOSSLESS todo
CompressionQuality.JPEG2000LOW todo
CompressionQuality.JPEG2000MAXIMUM todo
CompressionQuality.JPEG2000MEDIUM todo
CompressionQuality.JPEG2000MINIMUM todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
CompressionQuality.ZIP4BIT todo
CompressionQuality.ZIP8BIT todo
[Link] todo
42.29 CoordinateSystem
Value Description
[Link] todo
[Link] todo
42.30 CropOptions
Value Description
[Link] Japanese
[Link] Standard
42.31 DocumentArtboardLayout
Value Description
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
42.32 DocumentColorSpace
Value Description
[Link] CMYK
[Link] RGB
42.33 DocumentLayoutStyle
Value Description
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
42.34 DocumentPresetType
Value Description
[Link] Basic CMYK
[Link] Basic RGB
[Link] Mobile
[Link] Print
[Link] Video
[Link] Web
42.35 DocumentPreviewMode
Value Description
[Link] Default
[Link] Overprint
[Link] Pixel
42.36 DocumentRasterResolution
Value Description
[Link] Screen Resolution
[Link] High Resolution
[Link] Medium Resolution
42.37 DocumentTransparencyGrid
Value Description
[Link] Blue
[Link] Dark
[Link] Green
[Link] Light
[Link] Medium
[Link] None
[Link] Orange
[Link] Purple
[Link] Red
42.38 DocumentType
Value Description
[Link] EPS
[Link] FXG
[Link] Illustrator
[Link] PDF
42.39 DownsampleMethod
Value Description
[Link] Average Downsample
[Link] Bicubic Downsample
[Link] No Downsample
[Link] Subsample
42.40 ElementPlacement
Value Description
[Link] Inside
[Link] Place After
[Link] Place At Beginning
[Link] Place At End
[Link] Place Before
42.41 EPSPostScriptLevelEnum
Value Description
EPSPostScriptLevelEnum.LEVEL2 Level 2
EPSPostScriptLevelEnum.LEVEL3 Level 3
42.42 EPSPreview
Value Description
[Link] todo
[Link] todo
[Link] todo
[Link] todo
42.43 ExportType
Value Description
[Link] AutoCAD
[Link] FLASH
[Link] GIF
[Link] JPEG
[Link] Photoshop
ExportType.PNG24 PNG24
ExportType.PNG8 PNG8
[Link] SVG
[Link] TIFF
42.44 FigureStyleType
Value Description
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
42.45 FiltersPreservePolicy
Value Description
[Link] todo
[Link] todo
[Link] todo
42.46 FlashExportStyle
Value Description
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
42.47 FlashExportVersion
Value Description
FlashExportVersion.FlashVersion1 Version 1
FlashExportVersion.FlashVersion2 Version 2
FlashExportVersion.FlashVersion3 Version 3
FlashExportVersion.FlashVersion4 Version 4
FlashExportVersion.FlashVersion5 Version 5
FlashExportVersion.FlashVersion6 Version 6
FlashExportVersion.FlashVersion7 Version 7
FlashExportVersion.FlashVersion8 Version 8
FlashExportVersion.FlashVersion9 Version 9
42.48 FlashImageFormat
Value Description
[Link] Lossless
[Link] Lossy
42.49 FlashJPEGMethod
Value Description
[Link] Optimized
[Link] Standard
42.50 FlashPlaybackSecurity
Value Description
[Link] Local
[Link] Network
42.51 FontBaselineOption
Value Description
[Link] todo
[Link] todo
[Link] todo
42.52 FontCapsOption
Value Description
[Link] All Caps
[Link] All Smallcaps
[Link] Normal Caps
[Link] Small Caps
42.53 FontOpenTypePositionOption
Value Description
[Link] Denominator
[Link] Numerator
[Link] Opentype Default
[Link] Opentype Subscript
[Link] Opentype Superscript
42.54 FontSubstitutionPolicy
Value Description
[Link] Device
[Link] Oblique
[Link] Tint
42.55 FXGVersion
Value Description
FXGVersion.VERSION1PT0 Version 1 PT0
FXGVersion.VERSION2PT0 Version 2 PT0
42.56 GradientsPreservePolicy
Value Description
[Link] Automaticaly Convert Gradients
[Link] Keep Gradients Editable
42.57 GradientType
Value Description
[Link] Linear
[Link] Radial
42.58 ImageColorSpace
Value Description
[Link] CMYK
[Link] DeviceN
[Link] Grayscale
[Link] Indexed
[Link] LAB
[Link] RGB
[Link] Separation
42.59 InkPrintStatus
Value Description
[Link] Convert Ink
[Link] Enable Ink
[Link] Disable Ink
42.60 InkType
Value Description
[Link] Black Ink
[Link] Custom Ink
[Link] Cyan Ink
[Link] Magenta Ink
[Link] Yellow Ink
42.61 JavaScriptExecutionMode
Value Description
[Link] Before Running
[Link] On Runtime Error
[Link] Never
42.62 Justification
Value Description
[Link] Center
[Link] Full Justify
[Link] Full Justify Last Line Center
[Link] Full Justify Last Line Left
[Link] Full Justify Last Line Right
[Link] Left
[Link] Right
42.63 KinsokuOrderEnum
Value Description
[Link] todo
[Link] todo
[Link] todo
42.64 KnockoutState
Value Description
[Link] Disabled
[Link] Enabled
[Link] Inherited
[Link] Unknown
42.65 LanguageType
Value Description
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
LanguageType.DUTCH2005REFORM todo
[Link] todo
[Link] todo
LanguageType.GERMAN2006REFORM todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
LanguageType.SWISSGERMAN2006REFORM todo
[Link] todo
[Link] todo
[Link] todo
42.66 LayerOrderType
Value Description
[Link] Top Down
[Link] Bottom Up
42.67 LibraryType
Value Description
[Link] Brushes
[Link] Graphic Styles
[Link] Illustrator Artwork
[Link] Swatches
[Link] Symbols
42.68 MonochromeCompression
The type of compression to use on a monochrome bitmap item when saving a PDF file.
Value Description
MonochromeCompression.CCIT3 CCIT3
MonochromeCompression.CCIT4 CCIT4
[Link] MONOZIP
[Link] None
[Link] RUNLENGTH
42.69 OutputFlattening
How transparency should be flattened when saving EPS and Illustrator file formats with compatibility set to versions
of Illustrator earlier than Illustrator 10
Value Description
[Link] Preserve Appearance
[Link] Preserve Paths
42.70 PageMarksTypes
Value Description
[Link] Japanese
[Link] Roman
42.71 PathPointSelection
Value Description
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
42.72 PDFBoxType
Value Description
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
[Link] todo
42.73 PDFChangesAllowedEnum
Value Description
PDFChangesAllowedEnum.CHANGE128ANYCHANGES todo
PDFChangesAllowedEnum.CHANGE128COMMENTING todo
PDFChangesAllowedEnum.CHANGE128EDITPAGE todo
PDFChangesAllowedEnum.CHANGE128FILLFORM todo
PDFChangesAllowedEnum.CHANGE128NONE todo
PDFChangesAllowedEnum.CHANGE40ANYCHANGES todo
PDFChangesAllowedEnum.CHANGE40COMMENTING todo
PDFChangesAllowedEnum.CHANGE40NONE todo
PDFChangesAllowedEnum.CHANGE40PAGELAYOUT todo
42.74 PDFCompatibility
The version of the Acrobat file format to create when saving a PDF file
Value Description
PDFCompatibility.ACROBAT4 Acrobat 4
PDFCompatibility.ACROBAT5 Acrobat 5
PDFCompatibility.ACROBAT6 Acrobat 6
PDFCompatibility.ACROBAT7 Acrobat 7
PDFCompatibility.ACROBAT8 Acrobat 8
42.75 PDFOverprint
Value Description
[Link] Discard Pdf Overprint
[Link] Preserve Pdf Overprint
42.76 PDFPrintAllowedEnum
Value Description
PDFPrintAllowedEnum.PRINT128HIGHRESOLUTION 128 High Resolution
PDFPrintAllowedEnum.PRINT128LOWRESOLUTION 128 Low Resolution
PDFPrintAllowedEnum.PRINT128NONE 128 None
PDFPrintAllowedEnum.PRINT40HIGHRESOLUTION 40 High Resolution
PDFPrintAllowedEnum.PRINT40NONE 40 None
42.77 PDFTrimMarkWeight
Value Description
PDFTrimMarkWeight.TRIMMARKWEIGHT0125 Weight 0125
PDFTrimMarkWeight.TRIMMARKWEIGHT025 Weight 025
PDFTrimMarkWeight.TRIMMARKWEIGHT05 Weight 05
42.78 PDFXStandard
Value Description
PDFXStandard.PDFX1A2001 PDFX1A2001
PDFXStandard.PDFX1A2003 PDFX1A2003
PDFXStandard.PDFX32002 PDFX32002
PDFXStandard.PDFX32003 PDFX32003
PDFXStandard.PDFX42007 PDFX42007
[Link] PDFXNONE
42.79 PerspectiveGridType
Value Description
[Link] One Point Perspective Grid Type
[Link] Two Point Perspective Grid Type
[Link] Three Point Perspective Grid Type
[Link] Invalid Perspective Grid Type
42.80 PerspectiveGridPlaneType
Value Description
[Link] Grid Left Plane Type
[Link] Grid Right Plane Type
[Link] Grid Floor Plane Type
[Link] Invalid Grid Plane Type
42.81 PhotoshopCompatibility
Value Description
PhotoshopCompatibility.Photoshop6 Photoshop 6
PhotoshopCompatibility.Photoshop8 Photoshop 8
42.82 PointType
Value Description
[Link] Corner
[Link] Smooth
42.83 PolarityValues
Value Description
[Link] Negative
[Link] Positive
42.84 PostScriptImageCompressionType
Value Description
[Link] todo
[Link] todo
[Link] todo
42.85 PrintArtworkDesignation
Value Description
[Link] All Layers
[Link] Visible Layers
[Link] Visible Printable Layers
42.86 PrintColorIntent
Value Description
[Link] todo
[Link] todo
[Link] todo
[Link] todo
42.87 PrintColorProfile
Value Description
[Link] Custom Profile
[Link] Printer Profile
[Link] Oldstyle Profile
[Link] Source Profile
42.88 PrintColorSeparationMode
Value Description
[Link] Composite
[Link] Host-Based Separation
[Link] Inrip Separation
42.89 PrinterColorMode
Value Description
[Link] Black & White
[Link] Color
[Link] Grayscale
42.90 PrinterPostScriptLevelEnum
Value Description
PrinterPostScriptLevelEnum.PSLEVEL1 PS LEVEL 1
PrinterPostScriptLevelEnum.PSLEVEL2 PS LEVEL 2
PrinterPostScriptLevelEnum.PSLEVEL3 PS LEVEL 3
42.91 PrinterTypeEnum
Value Description
[Link] Non Postscript Printer
[Link] Postscript Printer
[Link] Unknown
42.92 PrintFontDownloadMode
Value Description
[Link] Download None
[Link] Download Complete
[Link] Download Subset
42.93 PrintingBounds
Value Description
[Link] Artboard Bounds
[Link] Artwork Bounds
42.94 PrintOrientation
Value Description
[Link] Auto Rotate
[Link] Landscape
[Link] Portrait
[Link] Reverse Landscape
[Link] Reverse Portrait
42.95 PrintPosition
Value Description
[Link] Translate Bottom
[Link] Translate Bottom Left
[Link] Translate Bottom Right
[Link] Translate Center
[Link] Translate Left
[Link] Translate Right
[Link] Translate Top
[Link] Translate Top Left
[Link] Translate Top Right
42.96 PrintTiling
Value Description
[Link] Full Pages
[Link] Single Full Page
[Link] Imageable Areas
42.97 RasterizationColorModel
Value Description
[Link] Bitmap
[Link] Default Color Model
[Link] Grayscale
42.98 RasterLinkState
The status of a raster item’s linked image if the image is stored externally
Value Description
[Link] Data From File
[Link] Data Modified
[Link] No Data
42.99 RulerUnits
Value Description
[Link] Centimeters
[Link] Qs
[Link] Inches
[Link] Pixels
[Link] Millimeters
[Link] Unknown
[Link] Picas
[Link] Points
42.100 SaveOptions
Value Description
[Link] Do Not Save Changes
[Link] Save Changes
[Link] Prompt To Save Changes
42.101 ScreenMode
Value Description
[Link] Desktop
[Link] Multi Window
[Link] Fullscreen
42.102 SpotColorKind
Value Description
[Link] CMYK
[Link] LAB
[Link] RGB
42.103 StrokeCap
Value Description
[Link] Butt
[Link] Round
[Link] Projecting
42.104 StrokeJoin
Value Description
[Link] Bevel
[Link] Round
[Link] Miter
42.105 StyleRunAlignmentType
Value Description
[Link] Bottom
[Link] ICF Top
[Link] Center
[Link] Roman Baseline
[Link] ICF Bottom
[Link] Top
42.106 SVGCSSPropertyLocation
How should the CSS properties of the document be included in an exported SVG file
Value Description
[Link] Entities
[Link] Style Attributes
[Link] Presentation Attributes
[Link] Style Elements
42.107 SVGDocumentEncoding
How should the text in the document be encoded when exporting an SVG file
Value Description
[Link] ASCII
SVGDocumentEncoding.UTF8 UTF8
SVGDocumentEncoding.UTF16 UTF16
42.108 SVGDTDVersion
Value Description
SVGDTDVersion.SVG1_0 SVG1_0
SVGDTDVersion.SVG1_1 SVG1_1
SVGDTDVersion.SVGBASIC1_1 SVGBASIC1_1
SVGDTDVersion.SVGTINY1_1 SVGTINY1_1
SVGDTDVersion.SVGTINY1_1PLUS SVGTINY1_1PLUS
SVGDTDVersion.SVGTINY1_2 SVGTINY1_2
42.109 SVGFontSubsetting
Value Description
[Link] All Glyphs
[Link] Glyphs Used Plus English
[Link] Common English
[Link] Glyphs Used Plus Roman
[Link] Common Roman
[Link] Glyphs Used
[Link] None
42.110 SVGFontType
Value Description
[Link] CEF Font
[Link] SVG Font
[Link] Outline Font
42.111 SymbolRegistrationPoint
Value Description
[Link] Bottom Left Point
[Link] Bottom Middle Point
[Link] Bottom Right Point
[Link] Center Point
[Link] Middle Left Point
[Link] Middle Right Point
[Link] Top Left Point
[Link] Top Middle Point
[Link] Top Right Point
42.112 TabStopAlignment
Value Description
[Link] Center
[Link] Decimal
[Link] Left
[Link] Right
42.113 TextAntialias
Value Description
[Link] Crisp
[Link] None
[Link] Sharp
[Link] Strong
42.114 TextOrientation
Value Description
[Link] Horizontal
[Link] Vertical
42.115 TextPreservePolicy
Value Description
[Link] Automatically Convert Text
[Link] Outline Text
[Link] Keep Text Editable
[Link] Rasterize Text
42.116 TextType
Value Description
[Link] Area Text
[Link] Point Text
[Link] Path Text
42.117 TIFFByteOrder
Value Description
[Link] IBM PC
[Link] Macintosh
42.118 TracingModeType
Value Description
[Link] Black & White
[Link] Color
[Link] Gray
42.119 Transformation
The point to use as the anchor point about which an object is rotated, resized, or transformed.
Value Description
[Link] Bottom
[Link] Bottom Left
[Link] Bottom Right
[Link] Center
[Link] Document Origin
[Link] Left
[Link] Right
[Link] Top
[Link] Top Left
[Link] Top Right
42.120 TrappingType
Value Description
[Link] todo
[Link] todo
[Link] todo
[Link] todo
42.121 UserInteractionLevel
Value Description
[Link] Display Alerts
[Link] Don’t Display Alerts
42.122 VariableKind
Value Description
[Link] Graph
[Link] Image
[Link] Visibility
[Link] Textual
[Link] Unknown
42.123 ViewRasterType
Value Description
[Link] Adjusted Image
[Link] No Image
[Link] Original Image
[Link] Transparent Image
42.124 ViewVectorType
Value Description
[Link] No Tracing Result
[Link] Outlines
[Link] Outlines With Tracing
[Link] Tracing Result
42.125 WariChuJustificationType
Value Description
[Link] Center
[Link] Left
[Link] Right
[Link] Warichu Auto Justify
[Link] Warichu Full Justify
[Link] Warichu Full Justify Last Line Center
[Link] Warichu Full Justify Last Line Left
[Link] Warichu Full Justify Last Line Right
42.126 ZOrderMethod
The method used to arrange an art item’s position in the stacking order of its parent group or layer, as specified with
the zOrder method
Value Description
[Link] Bring Forward
[Link] Send Backward
[Link] Bring To Front
[Link] Send To Back
FORTYTHREE
This section presents all of the object classes in the type library.
Each class listing includes the following:
• Properties of the class, including value type, read-only status, and an explanation.
• Methods for the class. Constants and value types needed by the method are shown in bold face. Required terms
are shown in plain face. All items surrounded by brackets [ ] are optional.
• Notes to explain special issues.
• Sample code to help illustrate the syntax and typical workflow usage of the object class.
These examples are intended to be clear demonstrations of syntax, and do not show the best or most efficient way to
construct a JavaScript script.
Error checking, for instance, is generally brief or missing.
However, the examples can be combined and expanded to make scripts with greater functionality.
141
Illustrator Scripting Guide, Release 0.0.1
FORTYFOUR
APPLICATION
app
Description
The Adobe® Illustrator® application object, referenced using the pre-defined global app object, which contains all
other Illustrator objects.
44.1 Properties
44.1.1 [Link]
[Link]
Description
The active (frontmost) document in Illustrator.
Type
Document
44.1.2 [Link]
[Link]
Description
If true, a web browser is available.
Type
Boolean; read-only.
143
Illustrator Scripting Guide, Release 0.0.1
44.1.3 [Link]
[Link]
Description
The application’s build number.
Type
String; read-only.
44.1.4 [Link]
[Link]
Description
The list of color-settings files currently available for use.
Type
Object; read-only.
44.1.5 [Link]
[Link]
Description
The coordinate system currently in use, document or artboard.
Type
CoordinateSystem
44.1.6 [Link]
[Link]
Description
The default color-settings file for the current application locale.
Type
File; read-only.
44.1.7 [Link]
[Link]
Description
The documents in the application.
Type
Documents
44.1.8 [Link]
[Link]
Description
The list of flattener style names currently available for use.
Type
Object; read-only.
44.1.9 [Link]
[Link]
Description
The amount of unused memory (in bytes) within the Illustrator partition.
Type
Number (long); read-only.
44.1.10 [Link]
[Link]
Description
The application’s locale.
Type
String; read-only.
44.1.11 [Link]
[Link]
Description
The application’s name (not related to the filename of the application file).
Type
String; read-only.
44.1.12 [Link]
[Link]
Description
If true, the paste operation maintains the layer structure.
Type
Boolean; read-only.
44.1.13 [Link]
[Link]
Description
The file path to the application.
Type
File; read-only.
44.1.14 [Link]
[Link]
Description
The list of preset PDF-options names available for use.
Type
Object; read-only.
44.1.15 [Link]
[Link]
Description
The list of PPD files currently available for use.
Type
Object; read-only.
44.1.16 [Link]
[Link]
Description
Illustrator’s preference settings.
Type
Preferences
44.1.17 [Link]
[Link]
Description
The list of installed printers.
Type
Array of Printer
44.1.18 [Link]
[Link]
Description
The list of preset printing-options names available for use.
Type
Object; read-only.
44.1.19 [Link]
[Link]
Description
The version of the Scripting plug-in.
Type
String; read-only.
44.1.20 [Link]
[Link]
Description
All currently selected objects in the active (frontmost) document.
Type
Array of Objects; read-only.
44.1.21 [Link]
[Link]
Description
The list of presets available for creating a new document.
Type
Object; read-only.
44.1.22 [Link]
[Link]
Description
The installed fonts.
Type
TextFonts
44.1.23 [Link]
[Link]
Description
The list of preset tracing-options names available for use.
Type
Array of Strings; read-only.
44.1.24 [Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
44.1.25 [Link]
[Link]
Description
What level of interaction with the user should be allowed when handling script commands.
Type
UserInteractionLevel
44.1.26 [Link]
[Link]
Description
The application’s version.
Type
String; read-only.
44.1.27 [Link]
[Link]
Description
If true, the application is visible.
Type
Boolean; read-only.
44.2 Methods
44.2.1 [Link]()
[Link]()
Description
Alerts the user.
Returns
Nothing.
44.2.2 [Link]()
[Link](matrix, secondMatrix)
Description
Joins two matrices together.
Parameters
Returns
jsobjref/Matrix.
44.2.3 [Link]()
[Link](matrix, angle)
Description
Joins a rotation translation to a transformation matrix.
Parameters
Returns
jsobjref/Matrix.
44.2.4 [Link]()
Returns
Matrix
44.2.5 [Link]()
Returns
Matrix
44.2.6 [Link]()
Returns
Array of ColorComponents
44.2.7 [Link]()
[Link]()
Description
Copies current selection to the clipboard.
Returns
Nothing.
44.2.8 [Link]()
[Link]()
Description
Cuts current selection to the clipboard.
Returns
Nothing.
44.2.9 [Link]()
[Link](workspaceName)
Description
Deletes an existing workspace.
Parameters
Returns
Boolean
44.2.10 [Link]()
[Link]()
Description
Returns an identity matrix.
Returns
Matrix
44.2.11 [Link]()
[Link](filePath)
Description
Returns whether the specified filePath is open
Parameters
Returns
Boolean
44.2.12 [Link]()
[Link](name)
Description
Gets detailed file information for specified PPD file.
Parameters
Returns
PPDFileInfo
44.2.13 [Link]()
[Link](presetType)
Description
Returns the full path to the application’s default document profile for the specified preset type.
Parameters
Returns
File
44.2.14 [Link]()
[Link](preset)
Description
Retrieves the tracing-option settings from the template with a given preset name.
Parameters
Returns
DocumentPreset
44.2.15 [Link]()
[Link]([angle])
Description
Returns a transformation matrix containing a single rotation.
Parameters
Returns
Matrix
44.2.16 [Link]()
[Link]([scaleX][, scaleY])
Description
Returns a transformation matrix containing a single scale.
Parameters
Returns
Matrix
44.2.17 [Link]()
[Link]()
Description
Gets the scriptable help group object that represents the search widget in the app bar.
Returns
Variant
44.2.18 [Link]()
[Link]([deltaX][, deltaY])
Description
Returns a transformation matrix containing a single translation.
Parameters
Returns
Matrix
44.2.19 [Link]()
[Link](matrix)
Description
Inverts a matrix.
Parameters
Returns
Matrix
44.2.20 [Link]()
[Link](matrix, secondMatrix)
Description
Checks whether the two matrices are equal.
Parameters
Returns
Boolean
44.2.21 [Link]()
[Link](matrix)
Description
Checks whether a matrix is singular and cannot be inverted.
Parameters
Returns
Boolean
44.2.22 [Link]()
[Link](fileSpec)
Description
Loads color settings from specified file, or, if file is empty, turns color management off.
Parameters
Returns
Nothing.
44.2.23 [Link]()
Note: If you open a pre-Illustrator 9 document that contains both RGB and CMYK colors and documentColorSpace
is supplied, all colors are converted to the specified color space.
If the parameter is not supplied, Illustrator opens a dialog so the user can choose the color space.
Parameters
Returns
Document
44.2.24 [Link]()
[Link]()
Description
Pastes current clipboard content into the current document.
Returns
Nothing.
44.2.25 [Link]()
[Link]()
Description
Quits Illustrator.
Note: If the clipboard contains data, Illustrator may show a dialog prompting the user to save the data for other
applications.
Returns
Nothing.
44.2.26 [Link]()
[Link]()
Description
Redoes the most recently undone transaction.
Returns
Nothing.
44.2.27 [Link]()
[Link]()
Description
Forces Illustrator to redraw all its windows.
Returns
Nothing.
44.2.28 [Link]()
[Link]()
Description
Resets the current workspace.
Returns
Boolean
44.2.29 [Link]()
[Link](workspaceName)
Description
Saves a new workspace.
Parameters
Returns
Boolean
44.2.30 [Link]()
Returns
String
44.2.31 [Link]()
[Link](fileSpec)
Description
Gets presets from the file.
Parameters
Returns
PrintPresetList
44.2.32 [Link]()
[Link](workspaceName)
Description
Switches to the specified workspace.
Parameters
Returns
Boolean
44.2.33 [Link]()
[Link](text)
Description
Translates the placeholder text to regular text (a way to enter Unicode points in hex values).
Parameters
Returns
String
44.2.34 [Link]()
[Link]()
Description
Undoes the most recent transaction.
Returns
Nothing.
44.3 Example
var newItem;
var docSelected = [Link];
if ([Link] > 0) {
// Create a new document and move the selected items to it.
var newDoc = [Link]();
if ([Link] > 0) {
for (var i = 0; i < [Link]; i++) {
docSelected[i].selected = false;
newItem = docSelected[i].duplicate(newDoc, [Link]);
}
} else {
[Link] = false;
newItem = [Link](newDoc, [Link]);
(continues on next page)
FORTYFIVE
ARTBOARD
artboard
Description
An Artboard object represents a single artboard in a document. There can be between 1 to 100 artboards in one
document.
45.1 Properties
45.1.1 [Link]
[Link]
Description
Size and position of the artboard.
Type
Rect
45.1.2 [Link]
[Link]
Description
The unique identifying name of the artboard.
Type
String
163
Illustrator Scripting Guide, Release 0.0.1
45.1.3 [Link]
[Link]
Description
The parent of this object.
Type
Document; read-only.
45.1.4 [Link]
[Link]
Description
Ruler origin of the artboard, relative to the top left corner of the artboard.
Type
Point
45.1.5 [Link]
[Link]
Description
Pixel aspect ratio, used in ruler visualization if the units are pixels.
Range: 0.1 to 10.
Type
Number (double)
45.1.6 [Link]
[Link]
Description
Show center mark.
Type
Boolean
45.1.7 [Link]
[Link]
Description
Show cross hairs.
Type
Boolean
45.1.8 [Link]
[Link]
Description
Show title and action safe areas (for video).
Type
Boolean
45.1.9 [Link]
[Link]
Description
Read-only. The class name of this object.
Type
String
45.2 Methods
45.2.1 [Link]()
[Link]()
Description
Deletes this artboard object. You cannot remove the last artboard in a document.
Returns
Nothing.
FORTYSIX
ARTBOARDS
artboards
Description
A collection of Artboard objects.
46.1 Properties
46.1.1 [Link]
[Link]
Description
The number of datasets in the collection
Type
Number; read-only.
46.1.2 [Link]
[Link]
Description
The name of the object that contains this dataset
Type
Artboard; read-only.
167
Illustrator Scripting Guide, Release 0.0.1
46.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
46.2 Methods
46.2.1 [Link]()
[Link](artboardRect)
Description
Creates a new Artboard object.
Parameters
Returns
Artboard
46.2.2 [Link]()
[Link]()
Description
Retrieves the index position of the active artboard in the document’s list.
Returns the 0-based index.
Returns
Number (long)
46.2.3 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
Artboard
46.2.4 [Link]()
[Link](artboardRect, index)
Description
Creates a new Artboard object and inserts it at the given index in the list.
Parameters
Returns
Nothing.
46.2.5 [Link]()
[Link](index)
Description
Deletes an artboard object. You cannot remove the last artboard in a document.
Parameters
Returns
Nothing.
46.2.6 [Link]()
[Link](index)
Description
Makes a specific artboard active and makes it current in the iteration order.
Parameters
Returns
Nothing.
FORTYSEVEN
BRUSH
[Link][index
Description
A brush in an Illustrator document. Brushes are contained in documents. Additional brushes may be created by the
user within Illustrator. You can access brushes within a script, but you cannot create them.
47.1 Properties
47.1.1 [Link]
[Link][index].name
Description
The name of the brush
Type
String
47.1.2 [Link]
[Link][index].parent
Description
The document that contains this brush.
Type
Document; read-only.
171
Illustrator Scripting Guide, Release 0.0.1
47.1.3 [Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String; read-only.
47.2 Methods
47.2.1 [Link]()
[Link][index].applyTo(artItem)
Description
Applies the brush to a specific art item.
Parameters
Returns
Nothing.
47.3 Example
if ([Link] > 0) {
var docSelection = [Link];
if ([Link] > 0) {
var newGroup = [Link]();
FORTYEIGHT
BRUSHES
[Link]
Description
A collection of brush objects in a document.
48.1 Properties
48.1.1 [Link]
[Link]
Description
The number of objects in the collection
Type
Number; read-only.
48.1.2 [Link]
[Link]
Description
The document that contains this brushes collection.
Type
Object; read-only.
175
Illustrator Scripting Guide, Release 0.0.1
48.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
48.2 Methods
48.2.1 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
Brush
48.2.2 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Brush
48.3 Example
if ([Link] > 0) {
var numberOfBrushes = [Link];
}
FORTYNINE
CHARACTERATTRIBUTES
characterAttributes
Description
Specifies the properties of a character contained in a text frame. A CharacterStyle object associates these attributes
with a specific text range through its characterAttributes property.
Note: Character attributes do not have default values, and are undefined until explicitly set.
49.1 Properties
49.1.1 [Link]
[Link]
Description
The amount of inter-character spacing to be added to the left side of the character, in thousandths of an em (that amount
will not compress or expand during full-justification).
Type
Number (double)
49.1.2 [Link]
[Link]
Description
The amount of inter-character spacing to be added to the right side of the character, in thousandths of an em (that
amount will not compress or expand during full-justification).
Type
Number (double)
179
Illustrator Scripting Guide, Release 0.0.1
49.1.3 [Link]
[Link]
Description
The character alignment type.
Type
StyleRunAlignmentType
49.1.4 [Link]
[Link]
Description
The alternate glyphs form.
Type
AlternateGlyphsForm
49.1.5 [Link]
[Link]
Description
If true, the automatic leading should be used.
Type
Boolean
49.1.6 [Link]
[Link]
Description
The Japanese text baseline direction.
Type
BaselineDirectionType
49.1.7 [Link]
[Link]
Description
The baseline position of text.
Type
FontBaselineOption
49.1.8 [Link]
[Link]
Description
The amount of shift in points of the text baseline.
Type
Number (double)
49.1.9 [Link]
[Link]
Description
The case of text.
Type
FontCapsOption
49.1.10 [Link]
[Link]
Description
If true, the OpenType® connection forms should be used.
Type
Boolean
49.1.11 [Link]
[Link]
Description
If true, the contextual ligature should be used.
Type
Boolean
49.1.12 [Link]
[Link]
Description
If true, the discretionary ligature should be used.
Type
Boolean
49.1.13 [Link]
[Link]
Description
The number style in a OpenType font.
Type
FigureStyleType
49.1.14 [Link]
[Link]
Description
The color of the text fill.
Type
Color
49.1.15 [Link]
[Link]
Description
If true, the OpenType fractions should be used.
Type
Boolean
49.1.16 [Link]
[Link]
Description
The character horizontal scaling factor expressed as a percentage (100 = 100%).
Type
Number (double)
49.1.17 [Link]
[Link]
Description
If true, the Japanese OpenType font supports italics.
Type
Boolean
49.1.18 [Link]
[Link]
Description
The automatic kerning method to use.
Type
AutoKernType
49.1.19 [Link]
[Link]
Description
The language of text.
Type
LanguageType
49.1.20 [Link]
[Link]
Description
The amount of space between two lines of text, in points.
Type
Number (double)
49.1.21 [Link]
[Link]
Description
If true, the ligature should be used.
Type
Boolean
49.1.22 [Link]
[Link]
Description
If true, line breaks are not allowed.
Type
Boolean
49.1.23 [Link]
[Link]
Description
The OpenType baseline position.
Type
FontOpenTypePositionOption
49.1.24 [Link]
[Link]
Description
If true, the OpenType ordinals should be used.
Type
Boolean
49.1.25 [Link]
[Link]
Description
If true, the OpenType ornaments should be used.
Type
Boolean
49.1.26 [Link]
[Link]
Description
If true, the fill of the text should be overprinted.
Type
Boolean
49.1.27 [Link]
[Link]
Description
If true, the stroke of the text should be overprinted.
Type
Boolean
49.1.28 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
49.1.29 [Link]
[Link]
Description
If true, the Japanese OpenType font supports proportional glyphs.
Type
Boolean
49.1.30 [Link]
[Link]
Description
The character rotation angle in degrees.
Type
Number (double)
49.1.31 [Link]
[Link]
Description
Font size in points.
Type
Number (double)
49.1.32 [Link]
[Link]
Description
If true, characters use strike-through style.
Type
Boolean
49.1.33 [Link]
[Link]
Description
The color of the text stroke.
Type
Color
49.1.34 [Link]
[Link]
Description
Line width of stroke.
Type
Number (double)
49.1.35 [Link]
[Link]
Description
If true, the OpenType stylistic alternates should be used.
Type
Boolean
49.1.36 [Link]
[Link]
Description
If true, the OpenType swash should be used.
Type
Boolean
49.1.37 [Link]
[Link]
Description
The Tate-Chu-Yoko horizontal adjustment in points.
Type
Number (long)
49.1.38 [Link]
[Link]
Description
The Tate-Chu-Yoko vertical adjustment in points.
Type
Number (long)
49.1.39 [Link]
[Link]
Description
The text font.
Type
TextFont
49.1.40 [Link]
[Link]
Description
If true, the OpenType titling alternates should be used.
Type
Boolean
49.1.41 [Link]
[Link]
Description
The tracking or range kerning amount, in thousandths of an em.
Type
Number (long)
49.1.42 [Link]
[Link]
Description
The percentage of space reduction around a Japanese character.
Type
Number (double)
49.1.43 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
49.1.44 [Link]
[Link]
Description
If true, characters are underlined.
Type
Boolean
49.1.45 [Link]
[Link]
Description
Character vertical scaling factor expressed as a percentage (= 100%).
Type
Number (double)
49.1.46 [Link]
[Link]
Description
Specifies how the characters in Wari-Chu text (an inset note in Japanese text) are divided into two or more lines.
Type
Number (long)
49.1.47 [Link]
[Link]
Description
Specifies how the characters in Wari-Chu text (an inset note in Japanese text) are divided into two or more lines.
Type
Number (long)
49.1.48 [Link]
[Link]
Description
If true, Wari-Chu is enabled.
Type
Boolean
49.1.49 [Link]
[Link]
Description
The Wari-Chu justification.
Type
WariChuJustificationType
49.1.50 [Link]
[Link]
Description
The Wari-Chu line gap.
Type
Number (long)
49.1.51 [Link]
[Link]
Description
The number of Wari-Chu (multiple text lines fit into a space meant for one) lines.
Type
Number (long)
49.1.52 [Link]
[Link]
Description
The Wari-Chu scale.
Type
Number (double)
49.2 Example
FIFTY
CHARACTERS
[Link][index].contents
Description
A collection of characters (TextRange objects of length 1).
The elements are not named; you must access them by index.
50.1 Properties
50.1.1 [Link]
[Link][index].[Link]
Description
The number of characters in the collection.
Type
Number; read-only.
50.1.2 [Link]
[Link][index].[Link]
Description
The text art item that contains this character.
Type
Object; read-only.
193
Illustrator Scripting Guide, Release 0.0.1
50.1.3 [Link]
[Link][index].[Link]
Description
The class name of the referenced object.
Type
String; read-only.
50.2 Methods
50.2.1 [Link]()
[Link][index].[Link](contents[,relativeObject][,
insertionLocation])
Description
Adds a new character with specified text contents at the specified location in the current document.
If a location is not specified, adds the new character to the containing text frame after the current text selection or
insertion point.
Parameters
Returns
TextRange
50.2.2 [Link]()
[Link][index].[Link](contents)
Description
Adds a character before the specified text selection.
Parameters
Returns
TextRange
50.2.3 [Link]()
[Link][index].[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
TextRange
50.2.4 [Link]()
[Link][index].[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
50.3 Example
if ([Link] > 0) {
var doc = [Link];
var numChars = 0;
for (var i = 0; i < [Link]; i++) {
var textArtRange = [Link][i].contents;
numChars += [Link];
}
}
FIFTYONE
CHARACTERSTYLE
characterStyle
Description
Associates character attributes with characters. For an example, see CharacterStyles.
51.1 Properties
51.1.1 [Link]
[Link]
Description
The character properties for the style.
Type
CharacterAttributes, read-only.
51.1.2 [Link]
[Link]
Description
The character style’s name.
Type
String
197
Illustrator Scripting Guide, Release 0.0.1
51.1.3 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
51.1.4 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
51.2 Methods
51.2.1 [Link]()
[Link](textItem [,clearingOverrides])
Description
Applies the character style to the text object or objects.
Paramaters
Returns
Nothing
51.2.2 [Link]()
[Link]()
Description
Deletes the object.
Returns
Nothing.
FIFTYTWO
CHARACTERSTYLES
[Link]
Description
A collection of CharacterStyle objects.
52.1 Properties
52.1.1 [Link]
[Link]
Description
The number of characters in the collection.
Type
Number; read-only.
52.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object; read-only.
201
Illustrator Scripting Guide, Release 0.0.1
52.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String; read-only.
52.2 Methods
52.2.1 [Link]()
add(name)
Description
Creates a named character style.
Parameters
Returns
CharacterStyle
52.2.2 [Link]()
getByName(name)
Description
Gets the first element in the collection with the provided name.
Parameters
Returns
CharacterStyle
52.2.3 [Link]()
index(itemKey)
Description
Gets an element from the collection.
Parameters
Returns
CharacterStyle
52.2.4 [Link]()
removeAll()
Description
Deletes all elements in this collection.
Returns
Nothing.
52.3 Example
FIFTYTHREE
CMYKCOLOR
new cmykColor()
Description
A CMYK color specification, used where a color object is required.
If the color space of a document is RGB and you specify the color value for a page item in that document using CMYK,
Illustrator will translate the CMYK color specification into an RGB color specification. The same thing happens if the
document’s color space is CMYK and you specify colors using RGB. Since this translation can lose information, you
should specify colors using the class that matches the document’s actual color space.
53.1 Properties
53.1.1 [Link]
[Link]
Description
The black color value. Range 0.0–100.0. Default: 0.0
Type
Number (double)
53.1.2 [Link]
[Link]
Description
The cyan color value. Range 0.0–100.0. Default: 0.0
Type
Number (double)
205
Illustrator Scripting Guide, Release 0.0.1
53.1.3 [Link]
[Link]
Description
The magenta color value. Range 0.0–100.0. Default: 0.0
Type
Number (double)
53.1.4 [Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
53.1.5 [Link]
[Link]
Description
The yellow color value. Range 0.0–100.0. Default: 0.0
Type
Number (double)
53.2 Example
FIFTYFOUR
COLOR
color
Description
An abstract parent class for all color classes used in Illustrator.
Subclasses are:
54.1 GradientColor
gradientColor
Description
A gradient color specification in a Gradient object. A script can create a new gradient color using a reference to an
existing gradient in the document. If no existing gradient object is referenced, a default gradient is supplied.
54.1.1 Properties
[Link]
[Link]
Description
The gradient vector angle in degrees. Default: 0.0.
Type
Number (double).
209
Illustrator Scripting Guide, Release 0.0.1
[Link]
[Link]
Description
Reference to the object defining the gradient.
Type
Gradient
[Link]
[Link]
Description
The gradient highlight vector angle in degrees.
Type
Number (double).
[Link]
[Link]
Description
The gradient highlight vector length.
Type
Number (double).
[Link]
[Link]
Description
The gradient vector length.
Type
Number (double).
[Link]
[Link]
Description
An additional transformation matrix to manipulate the gradient path.
Type
Matrix.
[Link]
[Link]
Description
The gradient vector origin, the center point of the gradient in this color.
Type
Array of 2 numbers.
[Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
54.1.2 Example
// Creates a new RGB document, then changes the color of the first gradient stop of an␣
˓→indexed gradient
[Link]([Link]);
54.2 GrayColor
new GrayColor()
Description
A grayscale color specification, used where a color object is required.
54.2.1 Properties
[Link]
[Link]
Description
The tint of the gray. Range: 0.0 to 100.0, where 0.0 is black and 100.0 is white.
Type
Number (double).
[Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
54.2.2 Example
// Sets the color of the first word in the active document to a shade of gray
[Link] = true;
[Link] = textColor;
}
54.3 LabColor
labColor
Description
A color specification in the CIE Lab color space, used where a color object is required.
54.3.1 Properties
LabColor.a
labColor.a
Description
The a (red-green) color value. Range -128.0–128.0. Default: 0.0.
Type
Number (double).
LabColor.b
labColor.b
Description
The b (yellow-blue) color value. Range -128.0–128.0. Default: 0.0.
Type
Number (double).
LabColor.l
labColor.l
Description
The l (lightness) color value. Range -128.0–128.0. Default: 0.0.
Type
Number (double).
54.4 NoColor
new NoColor()
Description
Represents the “none” color. Assigning a NoColor object to the fill or stroke color of an art item is equivalent to setting
the filled or stroked property to false.
54.4.1 Properties
[Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
54.4.2 Example
[Link] = 255;
[Link] = 0;
[Link] = rgbColor;
redraw();
54.5 PatternColor
patternColor
Description
A pattern color specification. You can create a new pattern color by modifying an existing pattern in the document.
Any modification you make to a pattern affects that pattern in the Palette.
PatternColor objects can be used in any property that takes a color object, such as fillColor or strokeColor.
54.5.1 Properties
[Link]
[Link]
Description
Additional transformation arising from manipulating the path.
Type
Matrix
[Link]
[Link]
Description
A reference to the pattern object that defines the pattern to use in this color definition.
Type
Pattern
[Link]
[Link]
Description
If true, the prototype should be reflected before filling.
Default: false
Type
Boolean
[Link]
[Link]
Description
The axis around which to reflect, in points.
Default: 0.0
Type
Number (double)
[Link]
[Link]
Description
The angle in radians to rotate the prototype pattern before filling.
Default: 0.0
Type
Number (double)
[Link]
[Link]
Description
The fraction to which to scale the prototype pattern before filling, represented as a point containing horizontal and
vertical scaling percentages.
Type
Array of 2 numbers
[Link]
[Link]
Description
The angle in radians by which to slant the shear.
Default: 0.0
Type
Number (double)
[Link]
[Link]
Description
The axis to shear with respect to, in points.
Default: 0.0
Type
Number (double)
[Link]
[Link]
Description
The angle in radians to which to translate the unscaled prototype pattern before filling.
Default: 0.0
Type
Number (double)
[Link]
[Link]
Description
The distance in points to which to translate the unscaled prototype pattern before filling.
Default: 0.0
Type
Number (double)
[Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
54.5.2 Example
54.6 RGBColor
new RGBColor()
Description
An RGB color specification, used to apply an RGB color to a layer or art item.
If the color space of a document is RGB and you specify the color value for a page item in that document using CMYK,
Illustrator will translate the CMYK color specification into an RGB color specification. The same thing happens if the
document’s color space is CMYK and you specify colors using RGB. Since this translation can lose information, you
should specify colors using the class that matches the document’s actual color space.
54.6.1 Properties
[Link]
[Link]
Description
The blue color value. Range: 0.0 to 255.0.
Type
Number (double).
[Link]
[Link]
Description
The green color value. Range: 0.0 to 255.0.
Type
Number (double).
[Link]
[Link]
Description
The red color value. Range: 0.0 to 255.0.
Type
Number (double).
[Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
54.6.2 Example
if ([Link] > 0) {
// Define the new color
var newRGBColor = new RGBColor();
[Link] = 255;
[Link] = 255;
[Link] = 0;
[Link] = newRGBColor;
}
54.7 SpotColor
new SpotColor()
Description
Color class used to apply the color value of a spot at a specified tint value. Can be used in any property that takes a
color object.
54.7.1 Properties
[Link]
[Link]
Description
A reference to the spot color object that defines the color.
Type
Spot
[Link]
[Link]
Description
The tint of the color. Range: 0.0 to 100.0
Type
Number (double)
[Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
FIFTYFIVE
COMPOUNDPATHITEM
[Link][index
Description
A compound path. These objects are composed of multiple intersecting paths, resulting in transparent interior spaces
where the component paths overlap. The pathItems property provides access to the paths that make up the compound
path.
Paths contained within a compound path or group in a document are returned as individual paths when a script asks for
the paths contained in the document. However, paths contained in a compound path or group are not returned when a
script asks for the paths in a layer that contains the compound path or group.
All paths within a compound path share property values. Therefore, if you set the value of a property of any one of the
paths in the compound path, the properties of all other component paths are updated with the new value.
55.1 Properties
55.1.1 [Link]
[Link][index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout.
Type
KnockoutState
55.1.2 [Link]
[Link][index].blendingMode
Description
The mode used when compositing an object.
Type
BlendModes
223
Illustrator Scripting Guide, Release 0.0.1
55.1.3 [Link]
[Link][index].controlBounds
Description
The bounds of the object including stroke width and controls.
Type
Array of 4 numbers, read-only.
55.1.4 [Link]
[Link][index].editable
Description
If true, this item is editable.
Type
Boolean, read-only.
55.1.5 [Link]
[Link][index].geometricBounds
Description
The bounds of the object excluding stroke width.
Type
Array of 4 numbers, read-only.
55.1.6 [Link]
[Link][index].height
Description
The height of the compound path item excluding stroke width.
Type
Number (double).
55.1.7 [Link]
[Link][index].hidden
Description
If true, this compound path item is hidden.
Type
Boolean.
55.1.8 [Link]
[Link][index].isIsolated
Description
If true, this object is isolated.
Type
Boolean.
55.1.9 [Link]
[Link][index].layer
Description
The layer to which this compound path item belongs.
Type
Layer, read-only.
55.1.10 [Link]
[Link][index].left
Description
The position of the left side of the item (in points, measured from the left side of the page).
Type
Number (double).
55.1.11 [Link]
[Link][index].locked
Description
If true, this compound path item is locked.
Type
Boolean.
55.1.12 [Link]
[Link][index].name
Description
The name of this compound path item.
Type
String.
55.1.13 [Link]
[Link][index].note
Description
The note assigned to this item.
Type
String.
55.1.14 [Link]
[Link][index].opacity
Description
The opacity of the object. Range: 0.0 to 100.0
Type
Number (double).
55.1.15 [Link]
[Link][index].parent
Description
The parent of this object.
Type
Layer or GroupItem, read-only.
55.1.16 [Link]
[Link][index].pathItems
Description
The path art items in this compound path.
Type
PathItems, read-only.
55.1.17 [Link]
[Link][index].position
Description
The position (in points) of the top left corner of the compoundPathItem object in the format [x, y]. Does not include
stroke weight.
Type
Array of 2 numbers.
55.1.18 [Link]
[Link][index].selected
Description
If true, this compound path item is selected.
Type
Boolean.
55.1.19 [Link]
[Link][index].sliced
Description
If true, the item is sliced. Default: false
Type
Boolean.
55.1.20 [Link]
[Link][index].tags
Description
The tags contained in this object.
Type
Tags, read-only.
55.1.21 [Link]
[Link][index].top
Description
The position of the top of the item (in points, measured from the bottom of the page).
Type
Number (double).
55.1.22 [Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String, read-only.
55.1.23 [Link]
[Link][index].uRL
Description
The value of the Adobe URL tag assigned to this compound path item.
Type
String.
55.1.24 [Link]
[Link][index].visibilityVariable
Description
The visibility variable bound to the item.
Type
Variant.
55.1.25 [Link]
[Link][index].visibleBounds
Description
The visible bounds of the compound path item including stroke width.
Type
Array of 4 numbers, read-only.
55.1.26 [Link]
[Link][index].width
Description
The width of the compound path item excluding stroke width.
Type
Number (double).
55.1.27 [Link]
[Link][index].wrapInside
Description
If true, the text frame object should be wrapped inside this object.
Type
Boolean.
55.1.28 [Link]
[Link][index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double).
55.1.29 [Link]
[Link][index].wrapped
Description
If true, wrap text frame objects around this object (text frame must be above the object).
Type
Boolean.
55.1.30 [Link]
[Link][index].zOrderPosition
Description
The position of this art item within the stacking order of the group or layer (Parent) that contains the art item.
Type
Number (long), read-only.
55.2 Methods
55.2.1 [Link]()
[Link][index].duplicate([relativeObject][,
insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
CompoundPathItem
55.2.2 [Link]()
[Link][index].move(relativeObject,
insertionLocation)
Description
Moves the object.
Parameters
Returns
Nothing.
55.2.3 [Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
55.2.4 [Link]()
[Link][index].resize(
scaleX, scaleY [,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,scaleAbout]
)
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
55.2.5 [Link]()
[Link][index].rotate(
angle [,changePositions] [,changeFillPatterns]
[,changeFillGradients] [,changeStrokePattern] [,rotateAbout]
)
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
Returns
Nothing.
55.2.6 [Link]()
[Link][index].transform(
transformationMatrix [,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,transformAbout]
)
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
55.2.7 [Link]()
[Link][index].translate(
deltaX [,deltaY] [,transformObjects] [,transformFillPatterns]
[,transformFillGradients] [,transformStrokePatterns]
)
Description
Repositions the art item relative to the current position, where deltaX is the horizontal offset and deltaY is the vertical
offset.
Parameters
Returns
Nothing.
55.2.8 [Link]()
[Link][index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
55.3 Example
if ([Link] > 0) {
var doc = [Link];
var newCompoundPath = [Link]();
newPath = [Link]();
[Link](Array(Array(40, 100), Array(100, 100)));
newPath = [Link]();
[Link](Array(Array(100, 110), Array(100, 300)));
FIFTYSIX
COMPOUNDPATHITEMS
[Link]
Description
A collection of CompoundPathItem objects.
56.1 Properties
56.1.1 [Link]
[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
56.1.2 [Link]
[Link]
Description
The parent of this collection (either a Layer or a GroupItem).
Type
Object, read-only.
237
Illustrator Scripting Guide, Release 0.0.1
56.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
56.2 Methods
56.2.1 [Link]()
[Link]()
Description
Creates a new CompoundPathItem.
Returns
CompoundPathItem
56.2.2 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
CompoundPathItem
56.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
CompoundPathItem
56.2.4 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
56.3 Example
FIFTYSEVEN
DATASET
[Link][index
Description
A set of data used for dynamic publishing. A dataset allows you to collect a number of variables and their dynamic
data into one object. You must have at least one variable bound to an art item in order to create a dataset. See the class
Variable.
57.1 Properties
57.1.1 [Link]
[Link][index].name
Description
Then name of the dataset.
Type
String.
57.1.2 [Link]
[Link][index].parent
Description
The name of the object that contains this dataset.
Type
Document, read-only.
241
Illustrator Scripting Guide, Release 0.0.1
57.1.3 [Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String.
57.2 Methods
57.2.1 [Link]()
[Link][index].display()
Description
Displays the dataset.
Returns
Nothing.
57.2.2 [Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
57.2.3 [Link]()
[Link][index].update()
Description
Updates the dataset.
Returns
Nothing.
57.3 Example
// Create dataset 1
var ds1 = [Link]();
FIFTYEIGHT
DATASETS
[Link]
Description
A collection of Dataset objects.
58.1 Properties
58.1.1 [Link]
[Link]
Description
The number of datasets in the collection.
Type
Number, read-only.
58.1.2 [Link]
[Link]
Description
The name of the object that contains this dataset.
Type
Document, read-only.
245
Illustrator Scripting Guide, Release 0.0.1
58.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
58.2 Methods
58.2.1 [Link]()
[Link]()
Description
Creates a new dataset object.
Returns
Dataset
58.2.2 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
Dataset
58.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Dataset
58.2.4 [Link]()
[Link]()
Description
Removes all elements in the collection.
Returns
Nothing.
FIFTYNINE
DOCUMENT
[Link]
Description
An Illustrator document. Documents are contained in the Application object.
The default document settings—those properties starting with the word “default”—are global settings that affect the
current document. Be sure to modify these default properties only when a document is open. Note that if you set
default properties to desired values before creating new objects, you can streamline your scripts, eliminating the need
to specify specific properties such as fillColor and stroked that have default properties.
A document’s color space, height, and width can only be set when the document is created. You cannot modify these
properties in an existing document. See [Link]() for more information on how document color spaces are
handled.
59.1 Properties
59.1.1 [Link]
[Link]
Description
The currently opened dataset.
Type
Dataset
59.1.2 [Link]
[Link]
Description
The active layer in the document.
Type
Layer
249
Illustrator Scripting Guide, Release 0.0.1
59.1.3 [Link]
[Link]
Description
The document’s current view.
Type
View, read-only.
59.1.4 [Link]
[Link]
Description
All artboards in the document.
Type
Artboards, read-only.
59.1.5 [Link]
[Link]
Description
The brushes contained in the document.
Type
Brushes, read-only.
59.1.6 [Link]
[Link]
Description
The list of character styles in this document.
Type
CharacterStyles, read-only.
59.1.7 [Link]
[Link]
Description
The compound path items contained in the document.
Type
CompoundPathItems, read-only.
59.1.8 [Link]
[Link]
Description
The boundary of the document’s cropping box for output, or null if no value has been set.
Type
Array of 4 numbers.
59.1.9 [Link]
[Link]
Description
The style of the document’s cropping box.
Type
CropOptions
59.1.10 [Link]
[Link]
Description
The datasets contained in the document.
Type
Datasets, read-only.
59.1.11 [Link]
[Link]
Description
The color to use to fill new paths if defaultFilled is true.
Type
Color
59.1.12 [Link]
[Link]
Description
If true, a new path should be filled.
Type
Boolean.
59.1.13 [Link]
[Link]
Description
If true, the art beneath a filled object should be overprinted by default.
Type
Boolean.
59.1.14 [Link]
[Link]
Description
Default type of line capping for paths created.
Type
StrokeCap
59.1.15 [Link]
[Link]
Description
The stroke color for new paths if default stroked is true.
Type
Color
59.1.16 [Link]
[Link]
Description
If true, a new path should be stroked.
Type
Boolean.
59.1.17 [Link]
[Link]
Description
Default lengths for dashes and gaps in dashed lines, starting with the first dash length, followed by the first gap length,
and so on. Set to an empty object, {}, for solid line.
Type
Object.
59.1.18 [Link]
[Link]
Description
The default distance into the dash pattern at which the pattern should be started for new paths.
Type
Number (double).
59.1.19 [Link]
[Link]
Description
Default type of joints in new paths.
Type
StrokeJoin
59.1.20 [Link]
[Link]
Description
When a default stroke join is set to mitered, this property specifies when the join will be converted to beveled (squared-
off ) by default. The default miter limit of 4 means that when the length of the point reaches four times the stroke weight,
the join switches from a miter join to a bevel join. Range: 1 to 500; a value of 1 specifies a bevel join.
Type
Number (double).
59.1.21 [Link]
[Link]
Description
If true, the art beneath a stroked object should be overprinted by default.
Type
Boolean.
59.1.22 [Link]
[Link]
Description
Default width of stroke for new paths.
Type
Number (double).
59.1.23 [Link]
[Link]
Description
The color specification system to use for this document’s color space.
Type
DocumentColorSpace
59.1.24 [Link]
[Link]
Description
The file associated with the document, which includes the complete path to the file.
Type
File, read-only.
59.1.25 [Link]
[Link]
Description
The bounds of the illustration excluding the stroke width of any objects in the document.
Type
Array of 4 numbers, read-only.
59.1.26 [Link]
[Link]
Description
The gradients contained in the document.
Type
Gradients, read-only.
59.1.27 [Link]
[Link]
Description
The graphic styles defined in this document.
Type
GraphicStyles, read-only.
59.1.28 [Link]
[Link]
Description
The graph art items in this document.
Type
GraphItems, read-only.
59.1.29 [Link]
[Link]
Description
The group items contained in the document.
Type
GroupItems, read-only.
59.1.30 [Link]
[Link]
Description
The height of the document.
Type
Number (double), read-only.
59.1.31 [Link]
[Link]
Description
The list of inks in this document.
Type
Object, read-only.
59.1.32 [Link]
[Link]
Description
The Kinsoku set of characters that cannot begin or end a line of Japanese text.
Type
Object, read-only.
59.1.33 [Link]
[Link]
Description
The layers contained in the document.
Type
Layers, read-only.
59.1.34 [Link]
[Link]
Description
The legacy text items in the document.
Type
LegacyTextItems, read-only.
59.1.35 [Link]
[Link]
Description
The mesh art items contained in the document.
Type
MeshItems, read-only.
59.1.36 [Link]
[Link]
Description
A list of names of predefined Mojikumi sets which specify the spacing for the layout and composition of Japanese text.
Type
Object, read-only.
59.1.37 [Link]
[Link]
Description
The document’s name (not the complete file path to the document).
Type
String, read-only.
59.1.38 [Link]
[Link]
Description
The non-native art items in this document.
Type
NonNativeItems, read-only.
59.1.39 [Link]
[Link]
Description
The current output resolution for the document in dots per inch (dpi).
Type
Number (double), read-only.
59.1.40 [Link]
[Link]
Description
The page items (all art item classes) contained in the document.
Type
PageItems, read-only.
59.1.41 [Link]
[Link]
Description
The zero-point of the page in the document without margins, relative to the overall height and width.
Type
Array of 2 numbers.
59.1.42 [Link]
[Link]
Description
The list of paragraph styles in this document.
Type
ParagraphStyles, read-only.
59.1.43 [Link]
[Link]
Description
The application that contains this document.
Type
Application, read-only.
59.1.44 [Link]
[Link]
Description
The file associated with the document, which includes the complete path to the file.
Type
File, read-only.
59.1.45 [Link]
[Link]
Description
The path items contained in this document.
Type
PathItems, read-only.
59.1.46 [Link]
[Link]
Description
The patterns contained in this document.
Type
Patterns, read-only.
59.1.47 [Link]
[Link]
Description
The placed items contained in this document.
Type
PlacedItems, read-only.
59.1.48 [Link]
[Link]
Description
The plug-in items contained in this document.
Type
PluginItems, read-only.
59.1.49 [Link]
[Link]
Description
If true, this document should be printed as tiled output.
Type
Boolean, read-only.
59.1.50 [Link]
[Link]
Description
The document’s raster effect settings.
Type
RasterEffectOptions, read-only.
59.1.51 [Link]
[Link]
Description
The raster items contained in this document.
Type
RasterItems, read-only.
59.1.52 [Link]
[Link]
Description
The zero-point of the rulers in the document relative to the bottom left of the document.
Type
Array of 2 numbers.
59.1.53 [Link]
[Link]
Description
The default measurement units for the rulers in the document.
Type
RulerUnits, read-only.
59.1.54 [Link]
[Link]
Description
If true, the document has not been changed since last time it was saved.
Type
Boolean.
59.1.55 [Link]
[Link]
Description
References to the objects in this document’s current selection, or null when nothing is selected.
A reference to an insertion point is returned when there is an active insertion point in the contents of a selected text art
item. Similarly, a reference to a range of text is returned when characters are selected in the contents of a text art item.
Type
Array of objects.
59.1.56 [Link]
[Link]
Description
If true, placed images should be displayed in the document.
Type
Boolean, read-only.
59.1.57 [Link]
[Link]
Description
If true, long paths should be split when printing.
Type
Boolean, read-only.
59.1.58 [Link]
[Link]
Description
The spot colors contained in this document.
Type
Spots, read-only.
59.1.59 [Link]
[Link]
Description
If true, the file is a stationery file.
Type
Boolean, read-only.
59.1.60 [Link]
[Link]
Description
The story items in this document.
Type
Stories, read-only.
59.1.61 [Link]
[Link]
Description
The swatches in this document.
Type
Swatches, read-only.
59.1.62 [Link]
[Link]
Description
The swatch groups in this document.
Type
SwatchGroups, read-only.
59.1.63 [Link]
[Link]
Description
The art items in the document linked to symbols.
Type
SymbolItems, read-only.
59.1.64 [Link]
[Link]
Description
The symbols in this document.
Type
Symbols, read-only.
59.1.65 [Link]
[Link]
Description
The tags in this document.
Type
Tags, read-only.
59.1.66 [Link]
[Link]
Description
The text frames in this document.
Type
TextFrameItems, read-only.
59.1.67 [Link]
[Link]
Description
If true, full pages should be tiled when printing this document.
Type
Boolean, read-only.
59.1.68 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
59.1.69 [Link]
[Link]
Description
If true, the printer’s default screen should be used when printing this document.
Type
Boolean, read-only.
59.1.70 [Link]
[Link]
Description
The variables defined in this document.
Type
Variables, read-only.
59.1.71 [Link]
[Link]
Description
If true, the variables are locked.
Type
Boolean.
59.1.72 [Link]
[Link]
Description
The views contained in this document.
Type
Views, read-only.
59.1.73 [Link]
[Link]
Description
The visible bounds of the document, including stroke width of any objects in the illustration.
Type
Array of 4 numbers, read-only.
59.1.74 [Link]
[Link]
Description
The width of this document.
Type
Number (double), read-only.
59.1.75 [Link]
[Link]
Description
The XMP metadata packet associated with this document.
Type
String.
59.2 Methods
59.2.1 [Link]()
[Link]()
Description
Brings the first window associated with the document to the front.
Returns
Nothing.
59.2.2 [Link]()
[Link]([layoutStyle])
Description
Arranges multiple documents in the given layout style.
Parameters
Returns
Boolean.
59.2.3 [Link]()
[Link]([saveOptions])
Description
Closes a document using specified save options.
When you close a document, you should set your document reference to null to prevent your script from accidentally
trying to access closed documents.
Parameters
Returns
Nothing.
59.2.4 [Link]()
[Link]()
Description
Closes the specified non-UI document.
Returns
Nothing.
59.2.5 [Link]()
Returns
Point.
59.2.6 [Link]()
Returns
Nothing.
59.2.7 [Link]()
[Link](file)
Description
Exports the current PDF preset values to the file.
Parameters
Returns
Nothing.
59.2.8 [Link]()
[Link](file)
Description
Exports the current perspective grid preset values to the file.
Parameters
Returns
Nothing.
59.2.9 [Link]()
[Link](file)
Description
Exports the current print preset values to the file.
Parameters
Returns
Nothing.
59.2.10 [Link]()
[Link](fileSpec)
Description
Saves datasets into an XML library. The datasets contain variables and their associated dynamic data.
Parameters
Returns
Nothing.
59.2.11 [Link]()
[Link]([index])
Description
Resizes the artboard at the given index to fit currently selected art. Index default is 0. Returns true on success.
Parameters
Returns
Boolean.
59.2.12 [Link]()
[Link](uuid)
Description
Retrieves the pageitem using Uuid.
Parameters
Returns
PageItem.
59.2.13 [Link]()
[Link]()
Description
Retrieves the active plane of the active perspective grid of the document.
Returns
PerspectiveGridPlaneType
59.2.14 [Link]()
[Link]()
Description
Hides the current active grid for the document. If no grid is visible, does nothing. Returns true if a grid is hidden.
Returns
Boolean.
59.2.15 [Link]()
Returns
Nothing.
59.2.16 [Link]()
[Link](fileSpec)
Description
Loads the character styles from the Illustrator file.
Parameters
Returns
Nothing.
59.2.17 [Link]()
[Link](fileSpec)
Description
Loads the paragraph styles from the Illustrator file.
Parameters
Returns
Nothing.
59.2.18 [Link]()
[Link](fileSpec [, replacingPreset])
Description
Loads all PDF presets from a file.
Parameters
Returns
Nothing.
59.2.19 [Link]()
[Link](printPreset, fileSpec)
Description
Loads the named print preset from the file.
Parameters
Returns
Nothing.
59.2.20 [Link]()
[Link](fileSpec)
Description
Imports a library containing datasets, variables, and their associated dynamic data. Importing variables overwrites
existing variables and datasets.
Parameters
Returns
Nothing.
59.2.21 [Link]()
[Link]([options])
Description
Prints the document.
Parameters
Returns
Nothing.
59.2.22 [Link]()
Returns
RasterItem
59.2.23 [Link]()
[Link]([artboardLayout] [, artboardRowsOrCols] [,
artboardSpacing] [, artboardMoveArtwork])
Description
Rearranges artboards in the document. All arguments are optional.
Default layout style is DocumentArtboard [Link].
The second argument specifies the number of rows or columns, as appropriate for the chosen layout style, in the range
1..docNumArtboards-1, or 1 (the default) for single row/column layouts.
Spacing is a number of pixels, default 20.
When last argument is true (the default), artwork is moved with the artboards.
Parameters
Returns
Boolean.
59.2.24 [Link]()
[Link]()
Description
Saves the document in it current location.
Returns
Nothing.
59.2.25 [Link]()
[Link](saveIn [, options])
Description
Saves the document in the specified file as an Illustrator, EPS, or PDF file.
Parameters
Returns
Nothing.
59.2.26 [Link]()
[Link](saveIn)
Description
Saves the non-UI document at the specified path
Parameters
Returns
Nothing.
59.2.27 [Link]()
[Link]()
Description
Selects the objects on the currently active artboard. Returns true on success.
Returns
Boolean.
59.2.28 [Link]()
[Link](gridPlane)
Description
Sets the active plane of the active perspective grid of the document. Returns true on success.
Parameters
Returns
Boolean.
59.2.29 [Link]()
[Link](gridType, presetName)
Description
Selects a predefined preset to define grid for the current document. Returns true on success.
Parameters
Returns
Boolean.
59.2.30 [Link]()
[Link]()
Description
Shows the current active grid for the document, or if no grid is active, shows the default grid. Returns true on success.
Returns
Boolean.
59.2.31 [Link]()
[Link](imageFile, windowSize)
Description
Captures the current document window to the target TIFF image file.
Parameters
Returns
Nothing.
59.3 Example
// Creates a new document if none exists then sets fill and stroke defaults to true
var doc;
if ([Link] == 0) {
doc = [Link]();
} else {
doc = [Link];
}
[Link] = true;
[Link] = true;
SIXTY
DOCUMENTPRESET
documentPreset
Description
A preset document template to use when creating a new document. See [Link]().
60.1 Properties
60.1.1 [Link]
[Link]
Description
The layout of artboards in the new document. Default: GridByRow.
Type
DocumentArtboardLayout
60.1.2 [Link]
[Link]
Description
The number of rows (for rows layout) or columns (for column layout) of artboards. Range: 1 to (numArtboards - 1)
or 1 for single row or column layouts. Default: 1
Type
Number (long).
281
Illustrator Scripting Guide, Release 0.0.1
60.1.3 [Link]
[Link]
Description
The spacing between artboards in the new document. Default: 20.0
Type
Number (double).
60.1.4 [Link]
[Link]
Description
The color space for the new document.
Type
DocumentColorSpace
60.1.5 [Link]
[Link]
Description
The document link for bleed values.
Type
Boolean.
60.1.6 [Link]
[Link]
Description
The document bleed offset rectangle.
Type
Rectangle.
60.1.7 [Link]
[Link]
Description
The height in document points. Default: 792.0
Type
Number (double).
60.1.8 [Link]
[Link]
Description
The number of artboards for the new document. Range: 1 to 100. Default: 1.
Type
Number (long).
60.1.9 [Link]
[Link]
Description
The preview mode for the new document.
Type
DocumentPreviewMode
60.1.10 [Link]
[Link]
Description
The raster resolution for the new document.
Type
DocumentRasterResolution
60.1.11 [Link]
[Link]
Description
The document title.
Type
String.
60.1.12 [Link]
[Link]
Description
The transparency grid color for the new document.
Type
DocumentTransparencyGrid
60.1.13 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
60.1.14 [Link]
[Link]
Description
The ruler units for the new document.
Type
RulerUnits
60.1.15 [Link]
[Link]
Description
The width in document points. Default: 612.0
Type
Number (double).
SIXTYONE
DOCUMENTS
[Link]
Description
A collection of Document objects.
61.1 Properties
61.1.1 [Link]
[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
61.1.2 [Link]
[Link]
Description
The parent of this object.
Type
Object, read-only.
287
Illustrator Scripting Guide, Release 0.0.1
61.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
61.2 Methods
61.2.1 [Link]()
Description
Creates a new document using optional parameters and returns a reference to the new document.
Parameters
Returns
Document
61.2.2 [Link]()
Returns
Document
61.2.3 [Link]()
[Link](startupPreset)
Description
Creates a document without showing in UI.
Parameters
Returns
Document
61.2.4 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
Document
61.2.5 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Document
61.3 Example
[Link]([Link]);
SIXTYTWO
EPSSAVEOPTIONS
epsSaveOptions
Description
Options for saving a document as an Illustrator EPS file, used with the [Link]() method.
All properties are optional.
62.1 Properties
62.1.1 [Link]
[Link]
Description
If saveMultipleArtboards is true, this is considered for multi-asset extraction, which specifies the artboard range.
An empty string extracts all the artboards. Default: empty string
Type
String.
62.1.2 [Link]
[Link]
Description
If true, use CMYK PostScript.
Type
Boolean.
291
Illustrator Scripting Guide, Release 0.0.1
62.1.3 [Link]
[Link]
Description
Specifies the version of the EPS file format to save.
Default: Compatibility.ILLUSTRATOR1719.
Type
Compatibility
62.1.4 [Link]
[Link]
Description
If true, create a raster item of the gradient or gradient mesh so that PostScript Level 2 printers can print the object.
Default: false.
Type
Boolean.
62.1.5 [Link]
[Link]
Description
If true, all fonts used by the document should be embedded in the saved file (version 7 or later).
Default: false.
Type
Boolean.
62.1.6 [Link]
[Link]
Description
If true, linked image files are to be included in the saved document.
Type
Boolean.
62.1.7 [Link]
[Link]
Description
How should transparency be flattened for file formats older than Illustrator 9.
Type
OutputFlattening
62.1.8 [Link]
[Link]
Description
If true, thumbnail image of the EPS artwork should be included.
Type
Boolean.
62.1.9 [Link]
[Link]
Description
Whether to preserve, discard, or simulate the overprint.
Default: [Link].
Type
PDFOverprint
62.1.10 [Link]
[Link]
Description
PostScript Language Level to use (Level 1 valid for file format version 8 or older).
Default: EPSPostScriptLevelEnum.LEVEL2.
Type
EPSPostScriptLevelEnum
62.1.11 [Link]
[Link]
Description
The format for the EPS preview image.
Type
EPSPreview
62.1.12 [Link]
[Link]
Description
If true, all artboards or range of artboards are saved.
Default: false.
Type
Boolean.
62.1.13 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
62.2 Example
function exportFileAsEPS(destFile) {
var newFile = new File(destFile);
var saveDoc;
if ([Link] == 0) {
saveDoc = [Link]();
} else {
(continues on next page)
[Link](newFile, saveOpts);
}
SIXTYTHREE
EXPORTOPTIONSAUTOCAD
exportOptionsAutoCAD
Description
Options for exporting a document as an AutoCAD file, used with the [Link]() method. All properties
are optional.
When you export a document, a file extension is appended automatically. You should not include any file extension in
the file specification.
To override the default AutoCAD export format (DWG), use the [Link] property.
63.1 Properties
63.1.1 [Link]
[Link]
Description
If true, paths are altered if needed to maintain appearance.
Default: false.
Type
Boolean.
63.1.2 [Link]
[Link]
Description
The colors exported into the AutoCAD file.
Type
AutoCADColors
297
Illustrator Scripting Guide, Release 0.0.1
63.1.3 [Link]
[Link]
Description
If true, text is converted to vector paths; preserves the visual appearance of type.
Default: false.
Type
Boolean.
63.1.4 [Link]
[Link]
Description
The format to which the file is exported.
Default: [Link].
Type
AutoCADExportFileFormat
63.1.5 [Link]
[Link]
Description
Specifies whether to preserve appearance or editability during export.
Default: [Link].
Type
AutoCADExportOption
63.1.6 [Link]
[Link]
Description
If true, only selected artwork is exported.
Default: false.
Type
Boolean.
63.1.7 [Link]
[Link]
Description
The format in which raster art is exported.
Type
AutoCADRasterFormat
63.1.8 [Link]
[Link]
Description
If true, line weights are scaled by the same scaling factor as the rest of the drawing.
Default: false.
Type
Boolean.
63.1.9 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
63.1.10 [Link]
[Link]
Description
The measurement units from which to map.
Type
AutoCADUnit
63.1.11 [Link]
[Link]
Description
The ratio (as a percentage) by which output is scaled.
Range: 0 to 1000
Type
Number (double).
63.1.12 [Link]
[Link]
Description
The release of AutoCAD to which the file is exported.
Default: AutoCADCompatibility.AutoCADRelease24.
Type
AutoCADCompatibility
SIXTYFOUR
EXPORTOPTIONSFLASH
exportOptionsFlash
Description
Options for exporting a document as a Macromedia® Flash® (SWF) file, used with the [Link]() method.
All properties are optional.
When you export a document, the appropriate file extension is appended automatically. You should not include any file
extension in the file specification.
64.1 Properties
64.1.1 [Link]
[Link]
Description
How the art should be clipped during output. Default: [Link].
Type
ArtClippingOption
64.1.2 [Link]
[Link]
Description
If saveMultipleArtboards is true, this is considered for multi-asset extraction, which specifies the artboard range.
An empty string extracts all the artboards. Default: empty String.
Type
String.
301
Illustrator Scripting Guide, Release 0.0.1
64.1.3 [Link]
[Link]
Description
The background color of the exported Flash frames.
Type
RGBColor
64.1.4 [Link]
[Link]
Description
A list of layers to be included as the static background of the exported Flash frames.
Type
Array of Layers
64.1.5 [Link]
[Link]
Description
The animation type for blended objects. Default: [Link].
Type
BlendAnimationType
64.1.6 [Link]
[Link]
Description
If true, the exported file should be exported compressed. Default: false.
Type
Boolean.
64.1.7 [Link]
[Link]
Description
If true, all text is converted to vector paths; preserves the visual appearance of type in all Flash players. Default:
false.
Type
Boolean.
64.1.8 [Link]
[Link]
Description
The amount of curve information that should be presented. Default: 7.
Type
Number (long).
64.1.9 [Link]
[Link]
Description
If true, export all symbols defined in the palette. Default: false.
Type
Boolean.
64.1.10 [Link]
[Link]
Description
The style in which the exported data should be created in Flash. Default: [Link].
Type
FlashExportStyle
64.1.11 [Link]
[Link]
Description
The version of the exported SWF file. Default: FlashExportVersion.FlashVersion9.
Type
FlashExportVersion
64.1.12 [Link]
[Link]
Description
The display rate in frames per second. Range: 0.01–120.0. Default: 12.0.
Type
Number (double).
64.1.13 [Link]
[Link]
Description
If true, ignore kerning information in text objects. Default: false.
Type
Boolean.
64.1.14 [Link]
[Link]
Description
How should the image in the exported Flash file be compressed. Default: [Link].
Type
FlashImageFormat
64.1.15 [Link]
[Link]
Description
If true, include minimal XMP metadata in the SWF file. Default: false.
Type
Boolean.
64.1.16 [Link]
[Link]
Description
Specifies the JPEG method to use. Default: [Link].
Type
FlashJPEGMethod
64.1.17 [Link]
[Link]
Description
Level of compression to use. Range 1 to 10. Default: 3.
Type
Number (long).
64.1.18 [Link]
[Link]
Description
The order in which layers are exported to Flash frames. Default: [Link].
Type
LayerOrderType
64.1.19 [Link]
[Link]
Description
If true, the Flash file is set to loop when run. Default: false.
Type
Boolean.
64.1.20 [Link]
[Link]
Description
The access level for the exported SWF file. Default: [Link].
Type
FlashPlaybackSecurity
64.1.21 [Link]
[Link]
Description
If true, preserve appearance. If false, preserve editability. Default: false.
Type
Boolean.
64.1.22 [Link]
[Link]
Description
If true, export as read-only file. Default: false.
Type
Boolean.
64.1.23 [Link]
[Link]
Description
If a file with the same name already exists, should it be replaced. Default: [Link].
Type
SaveOptions
64.1.24 [Link]
[Link]
Description
The resolution in pixels per inch. Range: 72–2400. Default: 72.
Type
Number (double).
64.1.25 [Link]
[Link]
Description
If true, all artboards or range of artboards are saved. Default: false.
Type
Boolean.
64.1.26 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
64.2 Example
function exportToFlashFile(destFile) {
if ([Link] > 0) {
var exportOptions = new ExportOptionsFlash();
[Link] = 150;
SIXTYFIVE
EXPORTOPTIONSGIF
exportOptionsGIF
Description
Options for exporting a document as a GIF file, used with the [Link]() method. All properties are
optional.
When you export a document, the appropriate file extension is appended automatically. You should not include any file
extension in the file specification.
65.1 Properties
65.1.1 [Link]
[Link]
Description
If true, the exported image should be anti-aliased. Default: true.
Type
Boolean.
65.1.2 [Link]
[Link]
Description
If true, the exported image should be clipped to the art board. Default: false.
Type
Boolean.
309
Illustrator Scripting Guide, Release 0.0.1
65.1.3 [Link]
[Link]
Description
The number of colors in the exported image’s color table. Range: 2 to 256. Default: 128.
Type
Number (long).
65.1.4 [Link]
[Link]
Description
The method used to dither colors in the exported image. Default: [Link].
Type
ColorDitherMethod
65.1.5 [Link]
[Link]
Description
The method used to reduce the number of colors in the exported image. Default: ColorReductionMethod.
SELECTIVE.
Type
ColorReductionMethod
65.1.6 [Link]
[Link]
Description
How much should the colors of the exported image be dithered, where 100.0 is 100%.
Type
Number (long).
65.1.7 [Link]
[Link]
Description
The horizontal scaling factor to apply to the exported image, where 100.0 is 100%. Default: 100.0.
Type
Number (double).
65.1.8 [Link]
[Link]
Description
The level of information loss allowed during compression, where 100.0 is 100%.
Type
Number (long).
65.1.9 [Link]
[Link]
Description
If true, the exported image should be interlaced. Default: false.
Type
Boolean.
65.1.10 [Link]
[Link]
Description
If true, the art board should be matted with a color. Default: true.
Type
Boolean.
65.1.11 [Link]
[Link]
Description
The color to use when matting the art board. Default: WHITE.
Type
RGBColor
65.1.12 [Link]
[Link]
Description
If true, the exported image should be saved with an accompanying HTML file. Default: false.
Type
Boolean.
65.1.13 [Link]
[Link]
Description
If true, the exported image should use transparency. Default: true.
Type
Boolean.
65.1.14 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
65.1.15 [Link]
[Link]
Description
The vertical scaling factor to apply to the exported image, where 100.0 is 100%. Default: 100.0.
Type
Number (double).
65.1.16 [Link]
[Link]
Description
Howmuchshouldthecolortablebechangedtomatch the web palette, where 100 is maximum. Default: 0.
Type
Number (long).
65.2 Example
function exportToGIFFile(dest) {
if ([Link] > 0) {
var exportOptions = new ExportOptionsGIF();
[Link] = false;
[Link] = 64;
[Link] = [Link];
SIXTYSIX
EXPORTOPTIONSJPEG
exportOptionsJPEG
Description
Options for exporting a document as a JPEG file, used with the [Link]() method. All properties are
optional.
When you export a document, the appropriate file extension is appended automatically. You should not include any file
extension in the file specification.
66.1 Properties
66.1.1 [Link]
[Link]
Description
If true, the exported image should be anti-aliased. Default: true.
Type
Boolean.
66.1.2 [Link]
[Link]
Description
If true, the exported image should be clipped to the art board.
Type
Boolean.
315
Illustrator Scripting Guide, Release 0.0.1
66.1.3 [Link]
[Link]
Description
The amount of blur to apply to the exported image. Range: 0.0 to 2.0. Default: 0.0.
Type
Number (double).
66.1.4 [Link]
[Link]
Description
The horizontal scaling factor to apply to the exported image, where 100.0 is 100%. Default: 100.0.
Type
Number (double).
66.1.5 [Link]
[Link]
Description
If true, the art board should be matted with a color. Default: true.
Type
Boolean.
66.1.6 [Link]
[Link]
Description
The color to use when matting the art board. Default: white.
Type
RGBColor
66.1.7 [Link]
[Link]
Description
If true, the exported image should be optimized for web viewing. Default: true.
Type
Boolean.
66.1.8 [Link]
[Link]
Description
The quality of the exported image. Range: 0 to 100. Default: 30.
Type
Number (long).
66.1.9 [Link]
[Link]
Description
If true, the exported image should be saved with an accompanying HTML file. Default: false.
Type
Boolean.
66.1.10 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
66.1.11 [Link]
[Link]
Description
The vertical scaling factor to apply to the exported image. Range: 0.0 to 776.19. Default: 100.0.
Type
Number (double)
66.2 Example
function exportFileToJPEG(dest) {
if ([Link] > 0) {
var exportOptions = new ExportOptionsJPEG();
[Link] = false;
[Link] = 70;
SIXTYSEVEN
EXPORTOPTIONSPHOTOSHOP
exportOptionsPhotoshop
Description
Options for exporting a document as a Photoshop file, used with the [Link]() method. All properties are
optional.
When you export a document, the appropriate file extension is appended automatically. You should not include any file
extension in the file specification.
67.1 Properties
67.1.1 [Link]
[Link]
Description
If true, the exported image should be anti-aliased. Default: true.
Type
Boolean.
67.1.2 [Link]
[Link]
Description
If saveMultipleArtboards is true, this is considered for multi-asset extraction, which specifies the artboard range.
An empty string extracts all the artboards. Default: empty String.
Type
String.
319
Illustrator Scripting Guide, Release 0.0.1
67.1.3 [Link]
[Link]
Description
If true, text objects should be exported as editable text layers. Default: true.
Type
Boolean.
67.1.4 [Link]
[Link]
Description
If true, an ICC profile should be embedded in the exported file. Default: false.
Type
Boolean.
67.1.5 [Link]
[Link]
Description
The color space of the exported file. Default: [Link].
Type
ImageColorSpace
67.1.6 [Link]
[Link]
Description
Preserve as much of the original document’s structure as possible when exporting. Default: true.
Type
Boolean.
67.1.7 [Link]
[Link]
Description
Resolution of the exported file in dots per inch (dpi). Range: 72.0 to 2400.0. Default: 150.0.
Type
Number (double).
67.1.8 [Link]
[Link]
Description
If true, all artboards or range of artboards are saved. Default: false.
Type
Boolean.
67.1.9 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
67.1.10 [Link]
[Link]
Description
If true, a warning dialog should be displayed in case of conflicts in the export settings. Default: true.
Type
Boolean.
67.1.11 [Link]
[Link]
Description
If true, the document layers should be presented in the exported document. Default: true.
Type
Boolean.
67.2 Example
function exportFileToPSD(dest) {
if ([Link] > 0) {
var exportOptions = new ExportOptionsPhotoshop();
[Link] = 150;
SIXTYEIGHT
EXPORTOPTIONSPNG24
exportOptionsPNG24
Description
Options for exporting a document as a 24-bit PNG file, used with the [Link]() method. All properties
are optional.
When you export a document, the appropriate file extension is appended automatically. You should not include any file
extension in the file specification.
68.1 Properties
68.1.1 [Link]
[Link]
Description
If true, the exported image be anti-aliased. Default: true.
Type
Boolean.
68.1.2 [Link]
[Link]
Description
If true, the exported image be clipped to the art board. Default: false.
Type
Boolean.
323
Illustrator Scripting Guide, Release 0.0.1
68.1.3 [Link]
[Link]
Description
The horizontal scaling factor to apply to the exported image, where 100.0 is 100%. Default: 100.0.
Type
Number (double).
68.1.4 [Link]
[Link]
Description
If true, the art board be matted with a color. Default: true.
Type
Boolean.
68.1.5 [Link]
[Link]
Description
The color to use when matting the art board. Default: white.
Type
RGBColor
68.1.6 [Link]
[Link]
Description
If true, the exported image be saved with an accompanying HTML file. Default: false.
Type
Boolean.
68.1.7 [Link]
[Link]
Description
If true, the exported image use transparency. Default: true.
Type
Boolean.
68.1.8 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
68.1.9 [Link]
[Link]
Description
The vertical scaling factor to apply to the exported image, where 100.0 is 100. Default: 100.0.
Type
Number (double).
68.2 Example
function exportFileToPNG24(dest) {
if ([Link] > 0) {
var exportOptions = new ExportOptionsPNG24();
[Link] = false;
[Link] = false;
[Link] = true;
(continues on next page)
SIXTYNINE
EXPORTOPTIONSPNG8
exportOptionsPNG8
Description
Options for exporting a document as an 8-bit PNG file, used with the [Link]() method. All properties
are optional.
When you export a document, the appropriate file extension is appended automatically. You should not include any file
extension in the file specification.
69.1 Properties
69.1.1 [Link]
[Link]
Description
If true, the exported image should be anti-aliased. Default: true.
Type
Boolean.
69.1.2 [Link]
[Link]
Description
If true, the exported image should be clipped to the art board. Default: false.
Type
Boolean.
327
Illustrator Scripting Guide, Release 0.0.1
69.1.3 [Link]
[Link]
Description
The number of colors in the exported image’s color table. Range: 2 to 256. Default: 128.
Type
Number (long).
69.1.4 [Link]
[Link]
Description
The method used to dither colors in the exported image. Default: [Link].
Type
ColorDitherMethod
69.1.5 [Link]
[Link]
Description
The method used to reduce the number of colors in the exported image. Default: ColorReductionMethod.
SELECTIVE.
Type
ColorReductionMethod
69.1.6 [Link]
[Link]
Description
The amount (as a percentage) that the colors of the exported image are dithered, where 100.0 is 100%. Range: 0 to
100. Default: 88.
Type
Number (long).
69.1.7 [Link]
[Link]
Description
The horizontal scaling factor to apply to the exported image, where 100.0 is 100%. Default: 100.0.
Type
Number (double).
69.1.8 [Link]
[Link]
Description
If true, the exported image should be interlaced. Default: false.
Type
Boolean.
69.1.9 [Link]
[Link]
Description
If true, the art board should be matted with a color. Default: true.
Type
Boolean.
69.1.10 [Link]
[Link]
Description
The color to use when matting the art board. Default: white.
Type
RGBColor
69.1.11 [Link]
[Link]
Description
If true, the exported image be saved with an accompanying HTML file. Default: false.
Type
Boolean.
69.1.12 [Link]
[Link]
Description
If true, the exported image use transparency. Default: true.
Type
Boolean.
69.1.13 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
69.1.14 [Link]
[Link]
Description
The vertical scaling factor to apply to the exported image, where 100.0 is 100. Default: 100.0.
Type
Number (double).
69.1.15 [Link]
[Link]
Description
Specifies how much the color table should be changed to match the web palette, where 100 is maximum. Default: 0.
Type
Number (long).
69.2 Example
function exportFileToPNG8(dest) {
if ([Link] > 0) {
var exportOptions = new ExportOptionsPNG8();
[Link] = 8;
[Link] = false;
SEVENTY
EXPORTOPTIONSSVG
exportOptionsSVG
Description
Options for exporting a document as a SVG file, used with the [Link]() method. All properties are
optional.
When you export a document, the appropriate file extension is appended automatically. You should not include any file
extension in the file specification.
70.1 Properties
70.1.1 [Link]
[Link]
Description
A range of artboards to save, if saveMultipleArtboards is true. A comma-delimited list of artboard names., or
the empty string to save all artboards. Default: empty String.
Type
String.
70.1.2 [Link]
[Link]
Description
If true, the exported file should be compressed. Default: false.
Type
Boolean.
333
Illustrator Scripting Guide, Release 0.0.1
70.1.3 [Link]
[Link]
Description
The decimal precision for element coordinate values. Range: 1 to 7. Default: 3.
Type
Number (long)
70.1.4 [Link]
[Link]
Description
How the CSS properties of the document should be included in the exported file. Default:
[Link].
Type
SVGCSSPropertyLocation
70.1.5 [Link]
[Link]
Description
How the text in the document should be encoded. Default: [Link].
Type
SVGDocumentEncoding
70.1.6 [Link]
[Link]
Description
The SVG version to which the file should conform. Default: SVGDTDVersion.SVG1_1.
Type
SVGDTDVersion
70.1.7 [Link]
[Link]
Description
If true, the raster images contained in the document should be embedded in the exported file. Default: false.
Type
Boolean.
70.1.8 [Link]
[Link]
Description
Which font glyphs should be included in the exported file. Default: [Link].
Type
SVGFontSubsetting
70.1.9 [Link]
[Link]
Description
The type of font to included in the exported file. Default: [Link].
Type
SVGFontType
70.1.10 [Link]
[Link]
Description
If true, file information should be saved in the exported file. Default: false.
Type
Boolean.
70.1.11 [Link]
[Link]
Description
If true, save unused styles in the exported file. Default: false.
Type
Boolean.
70.1.12 [Link]
[Link]
Description
If true, variables and datasets should be saved in the exported file. Default: false.
Type
Boolean.
70.1.13 [Link]
[Link]
Description
If true, the exported file should be optimized for the SVG Viewer. Default: false.
Type
Boolean.
70.1.14 [Link]
[Link]
Description
If true, Illustrator editing capabilities should be preserved when exporting the document. Default: false.
Type
Boolean.
70.1.15 [Link]
[Link]
Description
If true, save the artboards specified by artboardRange in the exported file. Default: false.
Type
Boolean.
70.1.16 [Link]
[Link]
Description
If true, slice data should be exported with the file. Default: false.
Type
Boolean.
70.1.17 [Link]
[Link]
Description
If true, SVG automatic kerning is allowed in the file. Default: false.
Type
Boolean.
70.1.18 [Link]
[Link]
Description
If true, the SVG text-on-path construct is allowed in the file. Default: false.
Type
Boolean.
70.1.19 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
70.2 Example
function exportFileToSVG(dest) {
if ([Link] > 0) {
var exportOptions = new ExportOptionsSVG();
[Link] = true;
[Link] = false;
[Link] = [Link];
SEVENTYONE
EXPORTOPTIONSTIFF
exportOptionsTIFF
Description
Options for exporting a document as a TIFF file, used with the [Link]() method. All properties are
optional.
When you export a document, the appropriate file extension is appended automatically. You should not include any file
extension in the file specification.
71.1 Properties
71.1.1 [Link]
[Link]
Description
If true, the exported image should be anti-aliased. Default: true.
Type
Boolean.
71.1.2 [Link]
[Link]
Description
If saveMultipleArtboards is true, this is considered for multi-asset extraction, which specifies the artboard range.
An empty string extracts all the artboards. Default: empty String.
Type
String.
339
Illustrator Scripting Guide, Release 0.0.1
71.1.3 [Link]
[Link]
Description
The byte order to use in the new file.
Type
TIFFByteOrder
71.1.4 [Link]
[Link]
Description
The color space of the exported file. Default: [Link].
Type
ImageColorSpace
71.1.5 [Link]
[Link]
Description
If true, use IZW compression in the new file.
Type
Boolean.
71.1.6 [Link]
[Link]
Description
Resolution of the exported file in dots per inch (dpi). Range: 72.0 to 2400.0. Default: 150.0.
Type
Number (double).
71.1.7 [Link]
[Link]
Description
If true, all artboards or range of artboards are saved. Default: false.
Type
Number (double).
71.2 Example
function exportFileToPSD(dest) {
if ([Link] > 0) {
var exportOptions = new ExportOptionsTIFF();
[Link] = 150;
[Link] = [Link];
[Link] = false;
SEVENTYTWO
FXGSAVEOPTIONS
fxgSaveOptions
Description
Specifies options which may be supplied when saving a document as an FXG file. All properties are optional.
72.1 Properties
72.1.1 [Link]
[Link]
Description
If saveMultipleArtboards is true, this is considered for multi-asset extraction, which specifies the artboard range. An
empty string extracts all the artboards. Default: empty String.
Type
String.
72.1.2 [Link]
[Link]
Description
The policy used by FXG to expand blends. Default: [Link].
Type
BlendsExpandPolicy
343
Illustrator Scripting Guide, Release 0.0.1
72.1.3 [Link]
[Link]
Description
If true, linked images are downsampled (at 72 dpi). Default: false.
Type
Boolean.
72.1.4 [Link]
[Link]
Description
The policy used by FXG to preserve filters. Default: [Link].
Type
FiltersPreservePolicy
72.1.5 [Link]
[Link]
Description
The policy used by FXG to preserve gradients. Default: GradientsPreservePolicy.
AUTOMATICALLYCONVERTGRADIENTS.
Type
GradientsPreservePolicy
72.1.6 [Link]
[Link]
Description
If true, unused symbols are included. Default: false.
Type
Boolean.
72.1.7 [Link]
[Link]
Description
If true, the editing capabilities of FXG are preserved. Default: true.
Type
Boolean.
72.1.8 [Link]
[Link]
Description
If true, all artboards or range of artboards are saved. Default: false.
Type
Boolean.
72.1.9 [Link]
[Link]
Description
The policy used by FXG to preserve text. Default: [Link].
Type
TextPreservePolicy
72.1.10 [Link]
[Link]
Description
The version of the FXG file format to create. Default FXGVersion.VERSION2PT0.
Type
FXGVersion
SEVENTYTHREE
GRADIENT
gradient
Description
A gradient definition contained in a document. Scripts can create new gradients.
73.1 Properties
73.1.1 [Link]
[Link]
Description
The gradient stops contained in this gradient.
Type
GradientStops, read-only.
73.1.2 [Link]
[Link]
Description
The gradient’s name.
Type
String.
347
Illustrator Scripting Guide, Release 0.0.1
73.1.3 [Link]
[Link]
Description
The document that contains this gradient.
Type
Document, read-only.
73.1.4 [Link]
[Link]
Description
The kind of the gradient, either radial or linear.
Type
GradientType
73.1.5 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
73.2 Methods
73.2.1 [Link]()
[Link][index].remove()
Description
Removes the referenced object from the document.
Returns
Nothing.
73.3 Example
// Creates a new gradient in current document then applies the gradient to the frontmost␣
˓→path item
if ([Link] > 0) {
// Create a color for both ends of the gradient
var startColor = new RGBColor();
[Link] = 0;
[Link] = 100;
[Link] = 255;
SEVENTYFOUR
GRADIENTS
[Link]
Description
A collection of Gradient objects in a document.
74.1 Properties
74.1.1 [Link]
[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
74.1.2 [Link]
[Link]
Description
The parent of this object.
Type
Object, read-only.
351
Illustrator Scripting Guide, Release 0.0.1
74.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
74.2 Methods
74.2.1 [Link]()
[Link]()
Description
Creates a new Gradient object.
Returns
Gradient
74.2.2 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
Gradient
74.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Gradient
74.2.4 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
74.3 Example
SEVENTYFIVE
GRADIENTSTOP
[Link][index].gradientStops[index
Description
A gradient stop definition that represents a point on a specific gradient defined in the document. Each gradient stop
specifies a color change in the containing gradient. See Changing a gradient stop color for an example.
75.1 Properties
75.1.1 [Link]
[Link][index].gradientStops[index].color
Description
The color linked to this gradient stop.
Type
Color
75.1.2 [Link]
[Link][index].gradientStops[index].midPoint
Description
The midpoint key value, specified as a percentage from 13.0 to 87.0.
Type
Number (double).
355
Illustrator Scripting Guide, Release 0.0.1
75.1.3 [Link]
[Link][index].gradientStops[index].opacity
Description
The opacity value for the gradient stop. Range: 0.0 to 100.0
Type
Number (double).
75.1.4 [Link]
[Link][index].gradientStops[index].parent
Description
The gradient that contains this gradient stop.
Type
Gradient, read-only.
75.1.5 [Link]
[Link][index].gradientStops[index].rampPoint
Description
The location of the color in the blend in a range from 0.0 to 100.0, where 100.0 is 100%.
Type
Number (double).
75.1.6 [Link]
[Link][index].gradientStops[index].typename
Description
The class name of the referenced object.
Type
String, read-only.
75.2 Methods
75.2.1 [Link]()
[Link][index].gradientStops[index].remove()
Description
Deletes this object.
Returns
Nothing.
SEVENTYSIX
GRADIENTSTOPS
[Link][index].gradientStops
Description
A collection of GradientStop objects in a specific gradient. The elements are not named; you must access them by
index.
76.1 Properties
76.1.1 [Link]
[Link][index].[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
76.1.2 [Link]
[Link][index].[Link]
Description
The parent of this object.
Type
Object, read-only.
359
Illustrator Scripting Guide, Release 0.0.1
76.1.3 [Link]
[Link][index].[Link]
Description
The class name of the referenced object.
Type
String, read-only.
76.2 Methods
76.2.1 [Link]()
[Link][index].[Link]()
Description
Creates a new object.
Returns
GradientStop
76.2.2 [Link]()
[Link][index].[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
GradientStop
76.2.3 [Link]()
[Link][index].[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
GradientStop
76.2.4 [Link]()
[Link][index].[Link]()
Description
Deletes all objects in this collection.
Returns
Nothing.
76.3 Example
// Adds a new gradient stop to a gradient, color of new stop is 70% gray
if ([Link] > 0 && [Link] > 0) {
// Get a reference to the gradient to change
var changeGradient = [Link][0];
[Link] = [Link];
[Link] = [Link] - 10;
(continues on next page)
SEVENTYSEVEN
GRAPHICSTYLE
[Link][index
Description
A graphic style. Each graphic style defines a set of appearance attributes that you can apply non-destructively to page
items. Graphic styles are contained in documents. Scripts cannot create new graphic styles.
77.1 Properties
77.1.1 [Link]
[Link][index].name
Description
The graphic style name.
Type
String.
77.1.2 [Link]
[Link][index].parent
Description
The document that contains this graphic style.
Type
Document, read-only.
363
Illustrator Scripting Guide, Release 0.0.1
77.1.3 [Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String, read-only.
77.2 Methods
77.2.1 [Link]()
[Link][index].applyTo(artItem)
Description
Applies this art style to a specified art item.
Parameters
Returns
Nothing.
77.2.2 [Link]()
[Link][index].mergeTo(artItem)
Description
Merges this art style into the current styles of a specified art item.
Parameters
Returns
Nothing.
77.2.3 [Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
77.3 Example
// Duplicates each path item in the selection, places the duplicate into a new group,
// then applies a graphic style to the new groups items
if ([Link] > 0) {
var doc = [Link];
var selected = [Link];
var newGroup = [Link]();
[Link] = "NewGroup";
[Link](doc, [Link]);
SEVENTYEIGHT
GRAPHICSTYLES
[Link]
Description
A collection of GraphicStyle objects in a document.
78.1 Properties
78.1.1 [Link]
[Link]
Description
The number of graphic styles in the document.
Type
Number, read-only.
78.1.2 [Link]
[Link]
Description
The document that contains this graphic styles collection.
Type
Object, read-only.
367
Illustrator Scripting Guide, Release 0.0.1
78.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
78.2 Methods
78.2.1 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
String.
78.2.2 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
String, Number.
78.2.3 [Link]()
[Link]()
Description
Removes all elements in the referenced collection.
Returns
Nothing.
78.3 Example
if ([Link] > 0) {
var numberOfStyles = [Link];
}
SEVENTYNINE
GRAPHITEM
[Link][index
Description
Any graph artwork object. See example Rotating graph items.
79.1 Properties
79.1.1 [Link]
[Link][index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout. You cannot set this value to KnockoutState.
Unknown.
Type
KnockoutState
79.1.2 [Link]
[Link][index].blendingMode
Description
The mode used when compositing an object.
Type
BlendModes
371
Illustrator Scripting Guide, Release 0.0.1
79.1.3 [Link]
[Link][index].contentVariable
Description
The content variable bound to the graph item.
It is not necessary to set the type of the contentVariable before binding. Illustrator automatically set the type to
GRAPH.
Type
Variable
79.1.4 [Link]
[Link][index].controlBounds
Description
The content variable bound to the graph item.
The bounds of the object including stroke width and controls.
Type
Array of 4 numbers, read-only.
79.1.5 [Link]
[Link][index].editable
Description
If true, this graph item is editable.
Type
Boolean, read-only.
79.1.6 [Link]
[Link][index].geometricBounds
Description
The bounds of the object excluding stroke width.
Type
Array of 4 numbers, read-only.
79.1.7 [Link]
[Link][index].height
Description
The height of the graph item.
Type
Number (double), read-only.
79.1.8 [Link]
[Link][index].hidden
Description
If true, this graph item is hidden.
Type
Boolean.
79.1.9 [Link]
[Link][index].isIsolated
Description
If true, this object is isolated.
Type
Boolean.
79.1.10 [Link]
[Link][index].layer
Description
The layer to which this graph item belongs.
Type
Layer, read-only.
79.1.11 [Link]
[Link][index].left
Description
The offset (in points) of the left side of the graph item from the left side of the page.
Type
Number.
79.1.12 [Link]
[Link][index].locked
Description
If true, this graph item is locked.
Type
Boolean.
79.1.13 [Link]
[Link][index].name
Description
The name of this graph item.
Type
String.
79.1.14 [Link]
[Link][index].note
Description
The note assigned to this item.
Type
String.
79.1.15 [Link]
[Link][index].opacity
Description
The opacity of the object; the value is between 0.0 and 100.0.
Type
Number (double)
79.1.16 [Link]
[Link][index].parent
Description
The parent of this object.
Type
Layer or GroupItem
79.1.17 [Link]
[Link][index].position
Description
The position (in points) of the top left corner of the graphItem object in the format [x, y]. Does not include stroke
weight.
Type
Array of 2 numbers.
79.1.18 [Link]
[Link][index].selected
Description
If true, this object is selected.
Type
Boolean.
79.1.19 [Link]
[Link][index].sliced
Description
If true, the graph item is sliced. Default: false.
Type
Boolean.
79.1.20 [Link]
[Link][index].tags
Description
The tags contained in this graph item.
Type
Tags, read-only.
79.1.21 [Link]
[Link][index].top
Description
The offset (in points) of the top of the graph item from the bottom of the page.
Type
Number (double).
79.1.22 [Link]
[Link][index].typename
Description
The type of the graph item.
Type
String, read-only.
79.1.23 [Link]
[Link][index].uRL
Description
The value of the Adobe URL tag assigned to this graph item.
Type
String.
79.1.24 [Link]
[Link][index].visibilityVariable
Description
The visibility variable bound to the graph item.
It is not necessary to set the type of the visibilityVariable before binding. Illustrator automatically set the type to
VISIBILITY.
Type
Variable
79.1.25 [Link]
[Link][index].visibleBounds
Description
The visible bounds of the graph item including stroke width.
Type
Array of 4 numbers, read-only.
79.1.26 [Link]
[Link][index].width
Description
The width of the graph item. Range: 0.0 to 16348.0.
Type
Number (double).
79.1.27 [Link]
[Link][index].wrapInside
Description
If true, the text frame object should be wrapped inside this object.
Type
Boolean.
79.1.28 [Link]
[Link][index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double).
79.1.29 [Link]
[Link][index].wrapped
Description
If true, wrap text frame objects around this object. (Text frame must be above the object.)
Type
Boolean.
79.1.30 [Link]
[Link][index].zOrderPosition
Description
The position of this art item within the stacking order of the group or layer (parent) that contains the art item.
Type
Number (long).
79.2 Methods
79.2.1 [Link]()
[Link][index].duplicate([relativeObject] [,insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
GraphItem
79.2.2 [Link]()
[Link][index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
GraphItem
79.2.3 [Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
79.2.4 [Link]()
[Link][index].resize(scaleX, scaleY
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,scaleAbout])
)
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
79.2.5 [Link]()
[Link][index].rotate(angle
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,rotateAbout]
)
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
Returns
Nothing.
79.2.6 [Link]()
[Link][index].transform(transformationMatrix
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,transformAbout]
)
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
79.2.7 [Link]()
[Link][index].translate([deltaX] [,deltaY]
[,transformObjects] [,transformFillPatterns]
[,transformFillGradients] [,transformStrokePatterns]
)
Description
Repositions the art item relative to the current position, where deltaX is the horizontal offset and deltaY is the vertical
offset.
Parameters
Returns
Nothing.
79.2.8 [Link]()
[Link][index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
EIGHTY
GRAPHITEMS
[Link]
Description
A collection GraphItems objects, which gives you access to all the graph art items in an Illustrator document.
80.1 Properties
80.1.1 [Link]
[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
80.1.2 [Link]
[Link]
Description
The parent of this object.
Type
Object, read-only.
383
Illustrator Scripting Guide, Release 0.0.1
80.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
80.2 Methods
80.2.1 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
GraphItems
80.2.2 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
GraphItems
80.2.3 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
80.3 Example
if ([Link] > 0) {
var docRef = activeDocument;
var iCount = [Link];
if (iCount > 0) {
ok = true;
for (var i = 0; i < iCount; i++) {
var graphRef = [Link][i];
[Link] = true;
[Link](90); //rotate clockwise 90 degrees
}
redraw();
}
}
EIGHTYONE
GROUPITEM
[Link][index
Description
A grouped set of art items. Group items can contain all of the same page items that a layer can contain, including other
nested groups.
Paths contained in a group or compound path in a document are returned as individual paths when a script asks for
the paths contained in the document. However, paths contained in a group or compound path are not returned when a
script asks for the paths in a layer which contains the group or compound path.
81.1 Properties
81.1.1 [Link]
[Link][index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout.
Type
KnockoutState
81.1.2 [Link]
[Link][index].blendingMode
Description
The blend mode used when compositing an object.
Type
BlendModes
387
Illustrator Scripting Guide, Release 0.0.1
81.1.3 [Link]
[Link][index].clipped
Description
If true, the group is clipped to the clipping mask.
Type
Boolean.
81.1.4 [Link]
[Link][index].compoundPathItems
Description
The compound path items contained in this group.
Type
CompoundPathItems, read-only.
81.1.5 [Link]
[Link][index].controlBounds
Description
The bounds of the object including stroke width and controls.
Type
Array of 4 numbers, read-only.
81.1.6 [Link]
[Link][index].editable
Description
If true, this item is editable.
Type
Boolean, read-only.
81.1.7 [Link]
[Link][index].geometricBounds
Description
The bounds of the object excluding stroke width.
Type
Array of 4 numbers, read-only.
81.1.8 [Link]
[Link][index].graphItems
Description
he graph items contained in this group.
Type
GraphItems, read-only.
81.1.9 [Link]
[Link][index].groupItems
Description
The group items contained in this group.
Type
GroupItems, read-only.
81.1.10 [Link]
[Link][index].height
Description
The height of the group item.
Type
Number (double).
81.1.11 [Link]
[Link][index].hidden
Description
If true, this group item is hidden.
Type
Boolean.
81.1.12 [Link]
[Link][index].isIsolated
Description
If true, this object is isolated.
Type
Boolean.
81.1.13 [Link]
[Link][index].layer
Description
The layer to which this group item belongs.
Type
Layer, read-only.
81.1.14 [Link]
[Link][index].left
Description
The position of the left side of the item (in points, measured from the left side of the page).
Type
Number (double).
81.1.15 [Link]
[Link][index].legacyTextItems
Description
The legacy text items in the group.
Type
LegacyTextItems, read-only.
81.1.16 [Link]
[Link][index].locked
Description
If true, this group item is locked.
Type
Boolean.
81.1.17 [Link]
[Link][index].meshItems
Description
The mesh items contained in this group.
Type
MeshItems, read-only.
81.1.18 [Link]
[Link][index].name
Description
The name of this group item.
Type
String.
81.1.19 [Link]
[Link][index].nonNativeItems
Description
The non-native art items in this group.
Type
NonNativeItems
81.1.20 [Link]
[Link][index].note
Description
The note assigned to this item.
Type
String.
81.1.21 [Link]
[Link][index].opacity
Description
The opacity of the object. Range: 0.0 to 100.0.
Type
Number (double).
81.1.22 [Link]
[Link][index].pageItems
Description
The page items (all art item classes) contained in this group.
Type
PageItems, read-only.
81.1.23 [Link]
[Link][index].parent
Description
The parent of this object.
Type
Layer or GroupItem, read-only.
81.1.24 [Link]
[Link][index].pathItems
Description
The path items contained in this group.
Type
PathItems, read-only.
81.1.25 [Link]
[Link][index].placedItems
Description
The placed items contained in this group.
Type
PlacedItems, read-only.
81.1.26 [Link]
[Link][index].pluginItems
Description
The plug-in items contained in this group.
Type
PluginItems, read-only.
81.1.27 [Link]
[Link][index].position
Description
The position (in points) of the top left corner of the groupItem object in the format [x, y]. Does not include stroke
weight.
Type
Array of 2 numbers.
81.1.28 [Link]
[Link][index].rasterItems
Description
The raster items contained in this group.
Type
RasterItems, read-only.
81.1.29 [Link]
[Link][index].selected
Description
If true, this group item is selected.
Type
Boolean.
81.1.30 [Link]
[Link][index].sliced
Description
If true, the item sliced. Default: false.
Type
Boolean.
81.1.31 [Link]
[Link][index].symbolItems
Description
The symbol item objects in this group.
Type
SymbolItems, read-only.
81.1.32 [Link]
[Link][index].tags
Description
The tags contained in this group.
Type
Tags, read-only.
81.1.33 [Link]
[Link][index].textFrames
Description
The text art items contained in this group.
Type
TextFrameItems, read-only.
81.1.34 [Link]
[Link][index].top
Description
The position of the top of the item (in points, measured from the bottom of the page).
Type
Number (double).
81.1.35 [Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String, read-only.
81.1.36 [Link]
[Link][index].uRL
Description
The value of the Adobe URL tag assigned to this group item.
Type
String.
81.1.37 [Link]
[Link][index].visibilityVariable
Description
The visibility variable bound to the item.
Type
Variable
81.1.38 [Link]
[Link][index].visibleBounds
Description
The visible bounds of the group item including stroke width.
Type
Array of 4 numbers, read-only.
81.1.39 [Link]
[Link][index].width
Description
The width of the group item.
Type
Number (double).
81.1.40 [Link]
[Link][index].wrapInside
Description
If true, the text frame object should be wrapped inside this object.
Type
Boolean.
81.1.41 [Link]
[Link][index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double).
81.1.42 [Link]
[Link][index].wrapped
Description
If true, wrap text frame objects around this object (text frame must be above the object).
Type
Boolean.
81.1.43 [Link]
[Link][index].zOrderPosition
Description
The position of this group object within the stacking order of the group or layer (parent) that contains the group object.
Type
Number (long).
81.2 Methods
81.2.1 [Link]()
[Link][index].duplicate([relativeObject] [,insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
GroupItem
81.2.2 [Link]()
[Link][index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
GroupItem
81.2.3 [Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
81.2.4 [Link]()
[Link][index].resize(scaleX, scaleY
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,scaleAbout]
)
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
81.2.5 [Link]()
[Link][index].rotate(angle
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,rotateAbout]
)
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
Returns
Nothing.
81.2.6 [Link]()
[Link][index].transform(transformationMatrix
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,transformAbout]
)
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
81.2.7 [Link]()
[Link][index].translate([deltaX] [,deltaY]
[,transformObjects] [,transformFillPatterns]
[,transformFillGradients] [,transformStrokePatterns]
)
Description
Repositions the art item relative to the current position, where deltaX is the horizontal offset and deltaY is the vertical
offset.
Parameters
Returns
Nothing.
81.2.8 [Link]()
[Link][index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
81.3 Example
It is easy to modify all of the objects contained in a group. This example demonstrates how to simplify your operations
on multiple objects by creating group to contain them.
// Creates a new group item, adds a new path item, of triangle shape, to the group,
// then adds a new text item to the group and sets the fill color of the text to red
if ([Link] > 0) {
var triangleGroup = [Link]();
[Link] = true;
[Link] = true;
[Link] = false;
[Link] = 3;
EIGHTYTWO
GROUPITEMS
[Link]
Description
The collection of grouped art items in a document.
82.1 Properties
82.1.1 [Link]
[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
82.1.2 [Link]
[Link]
Description
The parent of this object.
Type
Object, read-only.
403
Illustrator Scripting Guide, Release 0.0.1
82.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
82.2 Methods
82.2.1 [Link]()
[Link]()
Description
Creates a new object.
Returns
GroupItem
82.2.2 [Link]()
[Link](imageFile)
Description
Places an external vector art file as a group item in the document.
Parameters
Returns
GroupItem
82.2.3 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
GroupItem
82.2.4 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
GroupItem
82.2.5 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
82.3 Example
The following script shows how you can import a PDF document using the [Link]() function.
Note: Before running this script you must create a one page PDF file and put it in the location /temp/[Link].
// Embeds a new group item in to the current document from a file specified by dest
// dest should contain the full path and file name
function embedPDF(dest) {
var embedDoc = new File(dest);
if ([Link] > 0 && [Link]) {
var doc = [Link];
var placed = [Link](embedDoc);
}
}
EIGHTYTHREE
ILLUSTRATORSAVEOPTIONS
illustratorSaveOptions
Description
Options for saving a document as an Illustrator file, used with the [Link]() method. All properties are
optional.
83.1 Properties
83.1.1 [Link]
[Link]
Description
If saveMultipleArtboards is true (which is valid only for Illustrator 13 or earlier), the document is considered
for multi-asset extraction, which specifies an artboard range. An empty string extracts all artboards. Default: empty
String.
Type
String.
83.1.2 [Link]
[Link]
Description
Specifies the version of Illustrator file format to create. Default: Compatibility.ILLUSTRATOR19.
Type
Compatibility
407
Illustrator Scripting Guide, Release 0.0.1
83.1.3 [Link]
[Link]
Description
(Illustrator version 10 or later.) If true, the saved file is compressed. Default: true.
Type
Boolean.
83.1.4 [Link]
[Link]
Description
(Illustrator version 9 or later.) If true, the document’s ICC profile is embedded in the saved file. Default: false.
Type
Boolean.
83.1.5 [Link]
[Link]
Description
(Illustrator version 7 or later.) If true, the linked image files is embedded in the saved file. Default: false.
Type
Boolean.
83.1.6 [Link]
[Link]
Description
(Versions before Illustrator 9.) How transparency should be flattened for older file format versions. Default:
[Link].
Type
OutputFlattening
83.1.7 [Link]
[Link]
Description
(Illustrator version 9 or later.) Include a subset of fonts when less than this percentage of characters is used in the
document. Range: 0.0 to 100.0. Default: 100.0.
Type
Number (double).
83.1.8 [Link]
[Link]
Description
(Illustrator version 10 or later.) If true, the file is saved as a PDF compatible file. Default: true.
Type
Boolean.
83.1.9 [Link]
[Link]
Description
If true, all artboards or range of the artboards are saved. Valid for Illustrator 13 or earlier.
Type
Boolean.
83.1.10 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
83.2 Example
function exportFileToAI(dest) {
if ([Link] > 0) {
var ai8Doc = new File(dest);
var saveOptions = new IllustratorSaveOptions();
[Link] = Compatibility.ILLUSTRATOR8;
[Link] = [Link];
[Link](ai8Doc, saveOptions);
}
}
EIGHTYFOUR
IMAGECAPTUREOPTIONS
imageCaptureOptions
Description
Options for image capture, used with the [Link]() method. All properties are optional.
84.1 Properties
84.1.1 [Link]
[Link]
Description
If true, the image result is anti-aliased. Default: false.
Type
Boolean
84.1.2 [Link]
[Link]
Description
If true, the artboard is matted with a color. Default: false.
Type
Boolean
411
Illustrator Scripting Guide, Release 0.0.1
84.1.3 [Link]
[Link]
Description
The color to use for the artboard matte. Default: white.
Type
RGBColor
84.1.4 [Link]
[Link]
Description
The resolution of the captured image file in points-per-inch (PPI), in the range [72.0 . . . 2400.0]. Default: 150.
Type
Number (double).
84.1.5 [Link]
[Link]
Description
If true, the image result is transparent. Default: false.
Type
Boolean.
84.1.6 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
EIGHTYFIVE
INK
[Link][index
Description
Associates a document ink name with ink information.
85.1 Properties
85.1.1 [Link]
[Link][index].inkInfo
Description
The ink information
Type
InkInfo
85.1.2 [Link]
[Link][index].name
Description
The ink’s name.
Type
String.
413
Illustrator Scripting Guide, Release 0.0.1
85.1.3 [Link]
[Link][index].typename
Description
The class name of the object.
Type
String, read-only.
EIGHTYSIX
INKINFO
[Link][index].inkInfo
Description
Ink information for printing a document.
86.1 Properties
86.1.1 [Link]
[Link][index].[Link]
Description
The ink’s screen angle in degrees. Range: -360 to 360.
Type
Number (double).
86.1.2 [Link]
[Link][index].[Link]
Description
The color of the custom ink.
Type
Color
415
Illustrator Scripting Guide, Release 0.0.1
86.1.3 [Link]
[Link][index].[Link]
Description
The neutral density. Minimum: 0.0.
Type
Number (double).
86.1.4 [Link]
[Link][index].[Link]
Description
The dot shape name.
Type
String.
86.1.5 [Link]
[Link][index].[Link]
Description
The ink’s frequency. Range: 0.0 to 1000.0.
Type
Number (double).
86.1.6 [Link]
[Link][index].[Link]
Description
The ink type.
Type
InkType
86.1.7 [Link]
[Link][index].[Link]
Description
The ink printing status.
Type
InkPrintStatus
86.1.8 [Link]
[Link][index].[Link]
Description
The trapping type.
Type
TrappingType
86.1.9 [Link]
[Link][index].[Link]
Description
The order of trapping for the ink. Range: 1 to 4 for CMYK.
Type
Number (long).
86.1.10 [Link]
[Link][index].[Link]
Description
The class name of the object.
Type
String, read-only.
86.2 Example
redraw();
EIGHTYSEVEN
INSERTIONPOINT
[Link][index].insertionPoints[index
Description
A location between characters that is used to insert new text objects. An insertion point is contained in an
InsertionPoints collection.
87.1 Properties
87.1.1 [Link]
[Link][index].insertionPoints[index].characters
Description
All the characters in this text range.
Type
Characters, read-only.
87.1.2 [Link]
[Link][index].insertionPoints[index].lines
Description
All the lines in this text range.
Type
Lines, read-only.
419
Illustrator Scripting Guide, Release 0.0.1
87.1.3 [Link]
[Link][index].insertionPoints[index].paragraphs
Description
All the paragraphs in this text range.
Type
Paragraphs, read-only.
87.1.4 [Link]
[Link][index].insertionPoints[index].parent
Description
The object’s container.
Type
TextRange, read-only.
87.1.5 [Link]
[Link][index].insertionPoints[index].story
Description
The story to which the text range belongs.
Type
Story, read-only.
87.1.6 [Link]
[Link][index].insertionPoints[index].textRanges
Description
All of the text in this text range.
Type
TextRanges, read-only.
87.1.7 [Link]
[Link][index].insertionPoints[index].typename
Description
The class name of the object.
Type
String, read-only.
87.1.8 [Link]
[Link][index].insertionPoints[index].words
Description
All the words contained in this text range.
Type
Words, read-only.
EIGHTYEIGHT
INSERTIONPOINTS
[Link][index].insertionPoints
Description
A collection of InsertionPoint objects.
88.1 Properties
88.1.1 [Link]
[Link][index].[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
88.1.2 [Link]
[Link][index].[Link]
Description
The object’s container.
Type
Object, read-only.
423
Illustrator Scripting Guide, Release 0.0.1
88.1.3 [Link]
[Link][index].[Link]
Description
The class name of the object.
Type
String, read-only.
88.2 Methods
88.2.1 [Link]()
[Link][index].[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
InsertionPoint
88.3 Example
redraw();
EIGHTYNINE
LAYER
[Link][index
Description
A layer in an Illustrator document. Layers may contain nested layers, which are called sublayers in the user interface.
The layer object contains all of the page items in the specific layer as elements. Your script can access page items as
elements of either the Layer object or as elements of the Document object. When accessing page items as elements
of a layer, only objects in that layer can be accessed. To access page items throughout the entire document, be sure to
refer to them as contained by the document.
89.1 Properties
89.1.1 [Link]
[Link][index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout. You cannot set this value to KnockoutState.
Unknown.
Type
KnockoutState
89.1.2 [Link]
[Link][index].blendingMode
Description
The mode used when compositing an object.
Type
BlendModes
427
Illustrator Scripting Guide, Release 0.0.1
89.1.3 [Link]
[Link][index].color
Description
The layer’s selection mark color.
Type
RGBColor
89.1.4 [Link]
[Link][index].compoundPathItems
Description
The compound path items contained in this layer.
Type
CompoundPathItems, read-only.
89.1.5 [Link]
[Link][index].dimPlacedImages
Description
If true, placed images should be rendered as dimmed in this layer.
Type
Boolean.
89.1.6 [Link]
[Link][index].graphItems
Description
The graph items contained in this layer.
Type
GraphItems, read-only.
89.1.7 [Link]
[Link][index].groupItems
Description
The group items contained in this layer.
Type
GroupItems, read-only.
89.1.8 [Link]
[Link][index].hasSelectedArtwork
Description
If true, an object in this layer has been selected; set to false to deselect all objects in the layer.
Type
Boolean.
89.1.9 [Link]
[Link][index].isIsolated
Description
If true, this object is isolated.
Type
Boolean.
89.1.10 [Link]
[Link][index].layers
Description
The layers contained in this layer.
Type
Layers, read-only.
89.1.11 [Link]
[Link][index].legacyTextItems
Description
The legacy text items in this layer.
Type
LegacyTextItems, read-only.
89.1.12 [Link]
[Link][index].locked
Description
If true, this layer is editable; set to false to lock the layer.
Type
Boolean.
89.1.13 [Link]
[Link][index].meshItems
Description
The mesh items contained in this layer.
Type
MeshItems, read-only.
89.1.14 [Link]
[Link][index].name
Description
The name of this layer.
Type
String.
89.1.15 [Link]
[Link][index].nonNativeItems
Description
The non-native art items in this layer.
Type
NonNativeItems
89.1.16 [Link]
[Link][index].opacity
Description
The opacity of the layer. Range: 0.0 to 100.0.
Type
Number (double).
89.1.17 [Link]
[Link][index].pageItems
Description
The page items (all art item classes) contained in this layer.
Type
PageItems
89.1.18 [Link]
[Link][index].parent
Description
The document or layer that contains this layer.
Type
Document or Layer, read-only.
89.1.19 [Link]
[Link][index].pathItems
Description
The path items contained in this layer.
Type
PathItems, read-only.
89.1.20 [Link]
[Link][index].placedItems
Description
The placed items contained in this layer.
Type
PlacedItems, read-only.
89.1.21 [Link]
[Link][index].pluginItems
Description
The plug-in items contained in this layer.
Type
PluginItems, read-only.
89.1.22 [Link]
[Link][index].preview
Description
If true, this layer should be displayed using preview mode.
Type
Boolean.
89.1.23 [Link]
[Link][index].printable
Description
If true, this layer should be printed when printing the document.
Type
Boolean.
89.1.24 [Link]
[Link][index].rasterItems
Description
The raster items contained in this layer.
Type
RasterItems, read-only.
89.1.25 [Link]
[Link][index].sliced
Description
If true, the layer item is sliced. Default: false.
Type
Boolean.
89.1.26 [Link]
[Link][index].symbolItems
Description
The symbol items contained in the layer.
Type
SymbolItems, read-only.
89.1.27 [Link]
[Link][index].textFrames
Description
The text art items contained in this layer.
Type
TextFrameItems, read-only.
89.1.28 [Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String, read-only.
89.1.29 [Link]
[Link][index].visible
Description
If true, this layer is visible.
Type
Boolean.
89.1.30 [Link]
[Link][index].zOrderPosition
Description
The position of this layer within the stacking order of layers in the document.
Type
Number (long), read-only.
89.2 Methods
89.2.1 [Link]()
[Link][index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
Layer
89.2.2 [Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
89.2.3 [Link]()
[Link][index].zOrder(ZOrderCmd)
Description
Arranges the layer’s position in the stacking order of the containing layer or document (parent) of this object.
Parameters
Returns
Nothing.
89.3 Example
if ([Link] > 0) {
var countOfLayers = [Link];
if (countOfLayers > 1) {
var bottomLayer = [Link][countOfLayers - 1];
[Link]([Link]);
} else {
alert("The active document only has only 1 layer");
}
}
NINETY
LAYERS
[Link]
Description
The collection of layers in the document.
90.1 Properties
90.1.1 [Link]
[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
90.1.2 [Link]
[Link]
Description
The parent of this object.
Type
Object, read-only.
437
Illustrator Scripting Guide, Release 0.0.1
90.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
90.2 Methods
90.2.1 [Link]()
[Link]()
Description
Creates a new layer in the document.
Returns
Layer
90.2.2 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
Layer
90.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Layer
90.2.4 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
90.3 Example
// Deletes all layers whose name begins with "Temp" in all open documents
var layersDeleted = 0;
for (var i = 0; i < [Link]; i++) {
var targetDocument = [Link][i];
var layerCount = [Link];
NINETYONE
LEGACYTEXTITEM
legacyTextItems[index
Description
A text object created in Illustrator CS (version 10) or earlier, which is uneditable until converted. To convert legacy
text, see [Link]().
You can view, move, and print legacy text, but you cant edit it. Legacy text has an “x” through its bounding box when
selected.
91.1 Properties
91.1.1 [Link]
legacyTextItems[index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout.
Type
KnockoutState
91.1.2 [Link]
legacyTextItems[index].blendingMode
Description
The blend mode used when compositing an object.
Type
BlendModes
441
Illustrator Scripting Guide, Release 0.0.1
91.1.3 [Link]
legacyTextItems[index].controlBounds
Description
The bounds of the object including stroke width and controls.
Type
Array of 4 numbers, read-only.
91.1.4 [Link]
legacyTextItems[index].converted
Description
If true, the legacy text item has been updated to a native text frame item.
Type
Boolean, read-only.
91.1.5 [Link]
legacyTextItems[index].editable
Description
If true, this item is editable.
Type
Boolean, read-only.
91.1.6 [Link]
legacyTextItems[index].geometricBounds
Description
The bounds of the object excluding stroke width.
Type
Array of 4 numbers, read-only.
91.1.7 [Link]
legacyTextItems[index].height
Description
The height of the group item.
Type
Number (double).
91.1.8 [Link]
legacyTextItems[index].hidden
Description
If true, this item is hidden.
Type
Boolean.
91.1.9 [Link]
legacyTextItems[index].isIsolated
Description
If true, this object is isolated.
Type
Boolean.
91.1.10 [Link]
legacyTextItems[index].layer
Description
The layer to which this item belongs.
Type
Layer, read-only.
91.1.11 [Link]
legacyTextItems[index].left
Description
The position of the left side of the item (in points, measured from the left side of the page).
Type
Number (double).
91.1.12 [Link]
legacyTextItems[index].locked
Description
If true, this item is locked.
Type
Boolean.
91.1.13 [Link]
legacyTextItems[index].name
Description
The name of this item.
Type
String.
91.1.14 [Link]
legacyTextItems[index].note
Description
The note assigned to this item.
Type
String.
91.1.15 [Link]
legacyTextItems[index].opacity
Description
The opacity of the object. Range: 0.0 to 100.0.
Type
Number (double).
91.1.16 [Link]
legacyTextItems[index].parent
Description
The parent of this object.
Type
Layer or GroupItem, read-only.
91.1.17 [Link]
legacyTextItems[index].position
Description
The position (in points) of the top left corner of the legacyTextItems[index object in the format [x, y]. Does not
include stroke weight.
Type
Array of 2 numbers.
91.1.18 [Link]
legacyTextItems[index].selected
Description
If true, this item is selected.
Type
Boolean.
91.1.19 [Link]
legacyTextItems[index].sliced
Description
If true, the item sliced. Default: false.
Type
Boolean.
91.1.20 [Link]
legacyTextItems[index].tags
Description
The tags contained in this item.
Type
Tags, read-only.
91.1.21 [Link]
legacyTextItems[index].top
Description
The position of the top of the item (in points, measured from the bottom of the page).
Type
Number (double).
91.1.22 [Link]
legacyTextItems[index].typename
Description
The class name of the referenced object.
Type
String, read-only.
91.1.23 [Link]
legacyTextItems[index].uRL
Description
The value of the Adobe URL tag assigned to this item.
Type
String.
91.1.24 [Link]
legacyTextItems[index].visibilityVariable
Description
The visibility variable bound to the item.
Type
Variable
91.1.25 [Link]
legacyTextItems[index].visibleBounds
Description
The visible bounds of the item including stroke width.
Type
Array of 4 numbers, read-only.
91.1.26 [Link]
legacyTextItems[index].width
Description
The width of the item.
Type
Number (double).
91.1.27 [Link]
legacyTextItems[index].wrapInside
Description
If true, the text frame object should be wrapped inside this object.
Type
Boolean.
91.1.28 [Link]
legacyTextItems[index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double).
91.1.29 [Link]
legacyTextItems[index].wrapped
Description
If true, wrap text frame objects around this object (text frame must be above the object).
Type
Boolean.
91.1.30 [Link]
legacyTextItems[index].zOrderPosition
Description
The position of this item within the stacking order of the group or layer (parent) that contains the item.
Type
Number (long), read-only.
91.2 Methods
91.2.1 [Link]()
legacyTextItems[index].convertToNative()
Description
Converts the legacy text item to a text frame and deletes the original legacy text.
Returns
GroupItem
91.2.2 [Link]()
legacyTextItems[index].duplicate([relativeObject] [,insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
LegacyTextItem
91.2.3 [Link]()
legacyTextItems[index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
LegacyTextItem
91.2.4 [Link]()
legacyTextItems[index].remove()
Description
Deletes this object.
Returns
Nothing.
91.2.5 [Link]()
[Link](scaleX, scaleY
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,scaleAbout]
)
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 = 100%.
Parameters
Returns
Nothing.
91.2.6 [Link]()
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
Returns
Nothing.
91.2.7 [Link]()
[Link](transformationMatrix
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,transformAbout]
)
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
91.2.8 [Link]()
[Link]([deltaX] [,deltaY]
[,transformObjects] [,transformFillPatterns]
[,transformFillGradients] [,transformStrokePatterns]
)
Description
Repositions the art item relative to the current position, where deltaX is the horizontal offset and deltaY is the vertical
offset.
Parameters
Returns
Nothing.
91.2.9 [Link]()
legacyTextItems[index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
NINETYTWO
LEGACYTEXTITEMS
legacyTextItems
Description
A collection of LegacyTextItem objects.
92.1 Properties
92.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
92.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
453
Illustrator Scripting Guide, Release 0.0.1
92.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
92.2 Methods
92.2.1 [Link]()
[Link]()
Description
Creates text frames from all legacy text items; the original legacy text items are deleted. Returns true on success.
Returns
Boolean.
92.2.2 [Link]()
[Link](name)
Description
Get the first element in the collection with the specified name.
Parameters
Returns
LegacyTextItem
92.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
LegacyTextItem
92.2.4 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
NINETYTHREE
LINES
lines
Description
A collection of TextRange objects representing lines of text in a text frame. The elements are not named; you must
access them by index.
93.1 Properties
93.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
93.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
457
Illustrator Scripting Guide, Release 0.0.1
93.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
93.2 Methods
93.2.1 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
TextRange
93.2.2 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
NINETYFOUR
MATRIX
matrix
Description
A transformation matrix specification, used to transform the geometry of objects. Use it to specify and retrieve matrix
information from an Illustrator document or from page items in a document.
Matrices are used in conjunction with the transform method and as a property of a number of objects. A matrix
specifies how to transform the geometry of an object. You can generate an original matrix using the Application object
methods [Link](), [Link](), or [Link]().
A Matrix is a record containing the matrix values, not a reference to a matrix object. The matrix commands operate
on the values of a matrix record. If a command modifies a matrix, a modified matrix record is returned as the result of
the command. The original matrix record passed to the command is not modified.
94.1 Properties
94.1.1 [Link]
[Link]
Description
Matrix property a.
Type
Number (double).
94.1.2 [Link]
[Link]
Description
Matrix property b.
Type
Number (double).
459
Illustrator Scripting Guide, Release 0.0.1
94.1.3 [Link]
[Link]
Description
Matrix property c.
Type
Number (double).
94.1.4 [Link]
[Link]
Description
Matrix property d.
Type
Number (double).
94.1.5 [Link]
[Link]
Description
Matrix property tx.
Type
Number (double).
94.1.6 [Link]
[Link]
Description
Matrix property ty.
Type
Number (double).
94.1.7 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
94.2 Example
To apply multiple transformations to objects, it is more efficient to use the matrix suite than to apply the transformations
one at a time. The following script demonstrates how to combine multiple matrices.
NINETYFIVE
MESHITEM
[Link][index
Description
A gradient mesh art item. You cannot create mesh items from a script. However, you can copy an existing mesh item
with the duplicate method, then use the one of the move methods to place the copy at the proper location.
95.1 Properties
95.1.1 [Link]
[Link][index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout.
Type
KnockoutState
95.1.2 [Link]
[Link][index].blendingMode
Description
The blend mode used when compositing an object.
Type
BlendModes
463
Illustrator Scripting Guide, Release 0.0.1
95.1.3 [Link]
[Link][index].controlBounds
Description
The bounds of the object including stroke width and controls.
Type
Array of 4 numbers, read-only.
95.1.4 [Link]
[Link][index].editable
Description
If true, this item is editable.
Type
Boolean, read-only.
95.1.5 [Link]
[Link][index].geometricBounds
Description
The bounds of the object excluding stroke width.
Type
Array of 4 numbers, read-only.
95.1.6 [Link]
[Link][index].height
Description
The height of the group item.
Type
Number (double).
95.1.7 [Link]
[Link][index].hidden
Description
If true, this item is hidden.
Type
Boolean.
95.1.8 [Link]
[Link][index].isIsolated
Description
If true, this object is isolated.
Type
Boolean.
95.1.9 [Link]
[Link][index].layer
Description
The layer to which this item belongs.
Type
Layer, read-only.
95.1.10 [Link]
[Link][index].left
Description
The position of the left side of the item (in points, measured from the left side of the page).
Type
Number (double).
95.1.11 [Link]
[Link][index].locked
Description
If true, this item is locked.
Type
Boolean.
95.1.12 [Link]
[Link][index].name
Description
The name of this item.
Type
String.
95.1.13 [Link]
[Link][index].note
Description
The note assigned to this item.
Type
String.
95.1.14 [Link]
[Link][index].opacity
Description
The opacity of the object. Range: 0.0 to 100.0.
Type
Number (double).
95.1.15 [Link]
[Link][index].parent
Description
The parent of this object.
Type
Layer or GroupItem, read-only.
95.1.16 [Link]
[Link][index].position
Description
The position (in points) of the top left corner of the MeshItem object in the format [x, y]. Does not include stroke
weight.
Type
Array of 2 numbers.
95.1.17 [Link]
[Link][index].selected
Description
If true, this item is selected.
Type
Boolean.
95.1.18 [Link]
[Link][index].sliced
Description
If true, the item sliced. Default: false.
Type
Boolean.
95.1.19 [Link]
[Link][index].tags
Description
The tags contained in this item.
Type
Tags, read-only.
95.1.20 [Link]
[Link][index].top
Description
The position of the top of the item (in points, measured from the bottom of the page).
Type
Number (double).
95.1.21 [Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String, read-only.
95.1.22 [Link]
[Link][index].uRL
Description
The value of the Adobe URL tag assigned to this item.
Type
String.
95.1.23 [Link]
[Link][index].visibilityVariable
Description
The visibility variable bound to the item.
Type
Variable
95.1.24 [Link]
[Link][index].visibleBounds
Description
The visible bounds of the item including stroke width.
Type
Array of 4 numbers, read-only.
95.1.25 [Link]
[Link][index].width
Description
The width of the item.
Type
Number (double).
95.1.26 [Link]
[Link][index].wrapInside
Description
If true, the text frame object should be wrapped inside this object.
Type
Boolean.
95.1.27 [Link]
[Link][index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double).
95.1.28 [Link]
[Link][index].wrapped
Description
If true, wrap text frame objects around this object (text frame must be above the object).
Type
Boolean.
95.1.29 [Link]
[Link][index].zOrderPosition
Description
The position of this item within the stacking order of the group or layer (parent) that contains the item.
Type
Number (long), read-only.
95.2 Methods
95.2.1 [Link]()
[Link][index].duplicate([relativeObject] [,insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
MeshItem
95.2.2 [Link]()
[Link][index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
MeshItem
95.2.3 [Link]()
[Link][index].move()
Description
Deletes this object.
Returns
Nothing.
95.2.4 [Link]()
[Link][index].resize(scaleX, scaleY
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,scaleAbout]
)
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
95.2.5 [Link]()
[Link][index].rotate(angle [,changePositions]
[,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,rotateAbout]
)
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
Returns
Nothing.
95.2.6 [Link]()
[Link][index].transform(transformationMatrix
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,transformAbout]
)
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
95.2.7 [Link]()
[Link][index].translate([deltaX] [,deltaY]
[,transformObjects] [,transformFillPatterns]
[,transformFillGradients] [,transformStrokePatterns]
)
Description
Repositions the art item relative to the current position, where deltaX is the horizontal offset and deltaY is the vertical
offset.
Parameters
Returns
Nothing.
95.2.8 [Link]()
[Link][index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
95.3 Example
NINETYSIX
MESHITEMS
[Link]
Description
A collection of MeshItem objects.
96.1 Properties
96.1.1 [Link]
[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
96.1.2 [Link]
[Link]
Description
The parent of this object.
Type
Object, read-only.
475
Illustrator Scripting Guide, Release 0.0.1
96.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
96.2 Methods
96.2.1 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
MeshItem
96.2.2 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
MeshItem
96.2.3 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
96.3 Example
To run this script, have two open documents. One document should contain at least one mesh item, the other document
can be empty. Make the empty document the frontmost before running the script.
NINETYSEVEN
NONNATIVEITEM
nonNativeItems[index
Description
A non-native artwork item.
97.1 Properties
97.1.1 [Link]
nonNativeItems[index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout.
Type
KnockoutState
97.1.2 [Link]
nonNativeItems[index].blendingMode
Description
The blend mode used when compositing an object.
Type
BlendModes
479
Illustrator Scripting Guide, Release 0.0.1
97.1.3 [Link]
nonNativeItems[index].controlBounds
Description
The bounds of the object including stroke width and controls.
Type
Array of 4 numbers, read-only.
97.1.4 [Link]
nonNativeItems[index].editable
Description
If true, this item is editable.
Type
Boolean, read-only.
97.1.5 [Link]
nonNativeItems[index].geometricBounds
Description
The bounds of the object excluding stroke width.
Type
Array of 4 numbers, read-only.
97.1.6 [Link]
nonNativeItems[index].height
Description
The height of the group item.
Type
Number (double).
97.1.7 [Link]
nonNativeItems[index].hidden
Description
If true, this item is hidden.
Type
Boolean.
97.1.8 [Link]
nonNativeItems[index].isIsolated
Description
If true, this object is isolated.
Type
Boolean.
97.1.9 [Link]
nonNativeItems[index].layer
Description
The layer to which this item belongs.
Type
Layer, read-only.
97.1.10 [Link]
nonNativeItems[index].left
Description
The position of the left side of the item (in points, measured from the left side of the page).
Type
Number (double).
97.1.11 [Link]
nonNativeItems[index].locked
Description
If true, this item is locked.
Type
Boolean.
97.1.12 [Link]
nonNativeItems[index].name
Description
The name of this item.
Type
String.
97.1.13 [Link]
nonNativeItems[index].note
Description
The note assigned to this item.
Type
String.
97.1.14 [Link]
nonNativeItems[index].opacity
Description
The opacity of the object. Range: 0.0 to 100.0.
Type
Number (double).
97.1.15 [Link]
nonNativeItems[index].parent
Description
The parent of this object.
Type
Document, Layer or GroupItem, read-only.
97.1.16 [Link]
nonNativeItems[index].position
Description
The position (in points) of the top left corner of the NonNativeItems[index object in the format [x, y]. Does not
include stroke weight.
Type
Array of 2 numbers.
97.1.17 [Link]
nonNativeItems[index].selected
Description
If true, this item is selected.
Type
Boolean.
97.1.18 [Link]
nonNativeItems[index].sliced
Description
If true, the item sliced. Default: false.
Type
Boolean.
97.1.19 [Link]
nonNativeItems[index].tags
Description
The tags contained in this item.
Type
Tags, read-only.
97.1.20 [Link]
nonNativeItems[index].top
Description
The position of the top of the item (in points, measured from the bottom of the page).
Type
Number (double).
97.1.21 [Link]
nonNativeItems[index].typename
Description
The class name of the referenced object.
Type
String, read-only.
97.1.22 [Link]
nonNativeItems[index].uRL
Description
The value of the Adobe URL tag assigned to this item.
Type
String.
97.1.23 [Link]
nonNativeItems[index].visibilityVariable
Description
The visibility variable bound to the item.
Type
Variable
97.1.24 [Link]
nonNativeItems[index].visibleBounds
Description
The visible bounds of the item including stroke width.
Type
Array of 4 numbers, read-only.
97.1.25 [Link]
nonNativeItems[index].width
Description
The width of the item.
Type
Number (double).
97.1.26 [Link]
nonNativeItems[index].wrapInside
Description
If true, the non-native-item object should be wrapped inside this object.
Type
Boolean.
97.1.27 [Link]
nonNativeItems[index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double).
97.1.28 [Link]
nonNativeItems[index].wrapped
Description
If true, wrap non-native-item objects around this object (non-native-item object must be above the object).
Type
Boolean.
97.1.29 [Link]
nonNativeItems[index].zOrderPosition
Description
The position of this item within the stacking order of the group or layer (parent) that contains the item.
Type
Number, read-only.
97.2 Methods
97.2.1 [Link]()
nonNativeItems[index].duplicate([relativeObject] [,insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
NonNativeItem
97.2.2 [Link]()
nonNativeItems[index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
NonNativeItem
97.2.3 [Link]()
nonNativeItems[index].remove()
Description
Deletes this object.
Returns
Nothing.
97.2.4 [Link]()
nonNativeItems[index].removeAll()
Description
Deletes all elements in this collection.
Returns
Nothing.
97.2.5 [Link]()
[Link](scaleX, scaleY
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,scaleAbout]
)
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
97.2.6 [Link]()
[Link](angle
[,changePositions] [,changeFillPatterns]
[,changeFillGradients] [,changeStrokePattern] [,rotateAbout]
)
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
Returns
Nothing.
97.2.7 [Link]()
[Link](transformationMatrix
[,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,transformAbout]
)
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
97.2.8 [Link]()
[Link]([deltaX] [,deltaY]
[,transformObjects] [,transformFillPatterns]
[,transformFillGradients] [,transformStrokePatterns]
)
Description
Repositions the art item relative to the current position, where deltaX is the horizontal offset and deltaY is the vertical
offset.
Parameters
Returns
Nothing.
97.2.9 [Link]()
nonNativeItems[index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
NINETYEIGHT
NONNATIVEITEMS
nonNativeItems
Description
A collection of NonNativeItem objects.
98.1 Properties
98.1.1 [Link]
[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
98.1.2 [Link]
[Link]
Description
The parent of this object.
Type
Object, read-only.
491
Illustrator Scripting Guide, Release 0.0.1
98.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
98.2 Methods
98.2.1 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
NonNativeItem, SymbolItem
NINETYNINE
OPENOPTIONS
openOptions
Description
Options for opening a document, used with the [Link]() method.
99.1 Properties
99.1.1 [Link]
[Link]
Description
Optional. Convert crop areas to artboards when opening a legacy document in Illustrator CS4 or later. When false,
crop areas are discarded. Default: true.
Type
Boolean.
99.1.2 [Link]
[Link]
Description
Optional. Convert print tiles to artboards when opening a legacy document in Illustrator CS4 or later. Default: false.
Type
Boolean.
493
Illustrator Scripting Guide, Release 0.0.1
99.1.3 [Link]
[Link]
Description
Optional. Create an artboard with the dimensions of the bounding box of the artwork when opening a legacy document
in Illustrator CS4 or later. Default: false.
Type
Boolean.
99.1.4 [Link]
[Link]
Description
Optional. Open the file as an Illustrator library of this type. Default: [Link].
Type
LibraryType
99.1.5 [Link]
[Link]
Description
Optional. Preserve legacy artboards when opening a legacy document in Illustrator CS4 or later. Default: true.
Type
Boolean.
99.1.6 [Link]
[Link]
Description
If true, preserves the spot colors in the gradient mesh objects for legacy documents (pre-Illustrator CS4). Default:
true.
Type
Boolean.
99.1.7 [Link]
[Link]
Description
Optional. If true, update all legacy text items (from previous versions of Illustrator). Default: false.
Type
Boolean.
99.2 Example
OPENOPTIONSAUTOCAD
openOptionsAutoCAD
Description
Options for opening an AutoCAD drawing, used with the [Link]() method.
100.1 Properties
100.1.1 [Link]
[Link]
Description
If true, the artwork is centered on the artboard. Default: true.
Type
Boolean.
100.1.2 [Link]
[Link]
Description
How to scale the drawing on import. Default: [Link].
Type
AutoCADGlobalScaleOption
497
Illustrator Scripting Guide, Release 0.0.1
100.1.3 [Link]
[Link]
Description
The value when globalScaleOption is [Link], expressed as a percentage.
Range: 0.0 to 100.0. Default is 100.0.
Type
Number (double).
100.1.4 [Link]
[Link]
Description
If true, the layers of the artwork are merged. Default: false.
Type
Boolean.
100.1.5 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
100.1.6 [Link]
[Link]
Description
If true, line weights are scaled by the same factor as the rest of the drawing. Default: false.
Type
Boolean.
100.1.7 [Link]
[Link]
Description
The name of the layout in the drawing to import.
Type
String.
100.1.8 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
100.1.9 [Link]
[Link]
Description
The unit to map to. Default: [Link].
Type
AutoCADUnit
100.1.10 [Link]
[Link]
Description
The ratio by which to scale while mapping units. Default: 1.0.
Type
Number (double).
ONE
OPENOPTIONSFREEHAND
openOptionsFreeHand
Description
Options for opening a FreeHand file.
101.1 Properties
101.1.1 [Link]
[Link]
Description
If true, all text is converted to vector paths; preserves the visual appearance of type. Default: false.
Type
Boolean.
101.1.2 [Link]
[Link]
Description
If true, imports only the page specified in the pageToOpen property. Default: true.
Type
Boolean.
501
Illustrator Scripting Guide, Release 0.0.1
101.1.3 [Link]
[Link]
Description
The number of the page to import when opening a multipage document. Valid only when importSinglePage is true.
Type
Number (long).
101.1.4 [Link]
[Link]
Description
The parent of this object.
Type
Object, read-only.
101.1.5 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
TWO
OPENOPTIONSPHOTOSHOP
openOptionsPhotoshop
Description
Options for opening a Photoshop document, used with the [Link]() method.
102.1 Properties
102.1.1 [Link]
[Link]
Description
The name of the layer comp to use when the document is converted.
Type
String.
102.1.2 [Link]
[Link]
Description
If true, preserve hidden layers when the document is converted. Default: false.
Type
Boolean.
503
Illustrator Scripting Guide, Release 0.0.1
102.1.3 [Link]
[Link]
Description
If true, preserve image maps when the document is converted. Default: true.
Type
Boolean.
102.1.4 [Link]
[Link]
Description
If true, preserve layers when the document is converted. Default: true.
Type
Boolean.
102.1.5 [Link]
[Link]
Description
If true, preserve slices when the document is converted. Default: true.
Type
Boolean.
102.1.6 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
THREE
PAGEITEM
[Link][index
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.
103.1 Properties
103.1.1 [Link]
[Link][index].artworkKnockout
Description
Is this object used to create a knockout.
Type
KnockoutState
103.1.2 [Link]
[Link][index].blendingMode
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%).
Type
BlendModes
505
Illustrator Scripting Guide, Release 0.0.1
103.1.3 [Link]
[Link][index].controlBounds
Description
The bounds of the object including stroke width and controls.
Type
Rect, read-only.
103.1.4 [Link]
[Link][index].editable
Description
If true, this page item is editable.
Type
Boolean, read-only.
103.1.5 [Link]
[Link][index].geometricBounds
Description
The object’s bounds excluding the stroke width.
Type
Array of 4 numbers, read-only.
103.1.6 [Link]
[Link][index].height
Description
The height of the page item, calculated from the geometric bounds. Range: 0.0 to 16348.0.
Type
Number (double).
103.1.7 [Link]
[Link][index].hidden
Description
If true, this page item is hidden.
Type
Boolean.
103.1.8 [Link]
[Link][index].isIsolated
Description
If true, this object is isolated.
Type
Boolean.
103.1.9 [Link]
[Link][index].layer
Description
The layer to which this page item belongs.
Type
Layer, read-only.
103.1.10 [Link]
[Link][index].left
Description
The left position of the art item.
Type
Number (double).
103.1.11 [Link]
[Link][index].locked
Description
If true, this page item is locked.
Type
Boolean.
103.1.12 [Link]
[Link][index].name
Description
The name of this page item.
Type
String.
103.1.13 [Link]
[Link][index].note
Description
The note assigned to this item.
Type
String.
103.1.14 [Link]
[Link][index].opacity
Description
The opacity of this object, where 100.0 is completely opaque and 0.0 is completely transparent.
Type
Number (double).
103.1.15 [Link]
[Link][index].parent
Description
The parent of this object.
Type
Object, read-only.
103.1.16 [Link]
[Link][index].pixelAligned
Description
True if this item is aligned to the pixel grid.
Type
Boolean.
103.1.17 [Link]
[Link][index].position
Description
The position (in points) of the top left corner of the item in the format {x, y}. Does not include stroke weight.
Type
Array of 2 numbers.
103.1.18 [Link]
[Link][index].selected
Description
If true, this object is selected.
Type
Boolean.
103.1.19 [Link]
[Link][index].sliced
Description
If true, preserve slices.
Type
Boolean.
103.1.20 [Link]
[Link][index].tags
Description
The collection of tags associated with this page item.
Type
Tags
103.1.21 [Link]
[Link][index].top
Description
The top position of the art item.
Type
Number (double).
103.1.22 [Link]
[Link][index].typename
Description
The class name of the object.
Type
String, read-only.
103.1.23 [Link]
[Link][index].uRL
Description
The value of the Adobe URL tag assigned to this page item.
Type
String.
103.1.24 [Link]
[Link][index].uuid
Description
The unique identifier for this pageItem
Type
String, read-only.
103.1.25 [Link]
[Link][index].visibilityVariable
Description
The visibility variable to which this page item path is bound.
Type
Variable
103.1.26 [Link]
[Link][index].visibleBounds
Description
The object’s visible bounds, including stroke width of any objects in the illustration.
Type
Array of 4 numbers, read-only.
103.1.27 [Link]
[Link][index].width
Description
The width of the page item, calculated from the geometric bounds. Range: 0.0 to 16348.0.
Type
Number (double).
103.1.28 [Link]
[Link][index].wrapInside
Description
If true, the text frame object should be wrapped inside this object.
Type
Boolean.
103.1.29 [Link]
[Link][index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double).
103.1.30 [Link]
[Link][index].wrapped
Description
If true, wrap text frame objects around this object (text frame must be above the object).
Type
Boolean.
103.1.31 [Link]
[Link][index].zOrderPosition
Description
The drawing order of the art within its group or layer.
Type
Number (long), read-only.
103.2 Methods
103.2.1 [Link]()
Returns
Returns.
103.2.2 [Link]()
[Link][index].resize(
scaleX, scaleY [,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,scaleAbout]
)
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
103.2.3 [Link]()
[Link][index].rotate(
angle [,changePositions] [,changeFillPatterns]
[,changeFillGradients] [,changeStrokePattern] [,rotateAbout]
)
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
Returns
Nothing.
103.2.4 [Link]()
[Link][index].transform(
transformationMatrix [,changePositions] [,changeFillPatterns] [,changeFillGradients]
[,changeStrokePattern] [,changeLineWidths] [,transformAbout]
)
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
103.2.5 [Link]()
[Link][index].translate(
deltaX [,deltaY] [,transformObjects] [,transformFillPatterns]
[,transformFillGradients] [,transformStrokePatterns]
)
Description
Repositions the art item relative to the current position, where deltaX is the horizontal offset and deltaY is the vertical
offset.
Parameters
Returns
Nothing.
103.2.6 [Link]()
[Link][index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
FOUR
PAGEITEMS
[Link]
Description
A collection of PageItem objects. Provides complete access to all the art items in an Illustrator document in the following
classes:
104.1 PathItem
[Link][index]
Description
Specifies a path item, which contains PathPoint objects that define its geometry.
The PathItem class gives you complete access to paths in Illustrator.
The setEntirePath method provides an extremely efficient way to create paths comprised of straight lines.
104.1.1 Properties
[Link]
[Link][index].area
Description
The area of this path in square points.
If the area is negative, the path is wound counterclockwise.
Self-intersecting paths can contain sub-areas that cancel each other out, which makes this value zero even though the
path has apparent area.
Type
Number (double); read-only.
517
Illustrator Scripting Guide, Release 0.0.1
[Link]
[Link][index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout.
Type
KnockoutState
[Link]
[Link][index].blendingMode
Description
The blend mode used when compositing an object.
Type
BlendModes
[Link]
[Link][index].clipping
Description
If true, this path should be used as a clipping path.
Type
Boolean
[Link]
[Link][index].closed
Description
If true, this path is closed.
Type
Boolean
[Link]
[Link][index].controlBounds
Description
The bounds of the object including stroke width and controls.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].editable
Description
If true, this item is editable.
Type
Boolean; read-only.
[Link]
[Link][index].evenodd
Description
If true, the even-odd rule should be used to determine “insideness.”
Type
Boolean
[Link]
[Link][index].fillColor
Description
The fill color of the path.
Type
Color
[Link]
[Link][index].filled
Description
If true, the path is filled.
Type
Boolean
[Link]
[Link][index].fillOverprint
Description
If true, the art beneath a filled object should be overprinted.
Type
Boolean
[Link]
[Link][index].geometricBounds
Description
The bounds of the object excluding stroke width.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].guides
Description
If true, this path is a guide object.
Type
Boolean
[Link]
[Link][index].height
Description
The height of the group item.
Type
Number (double)
[Link]
[Link][index].hidden
Description
If true, this item is hidden.
Type
Boolean
[Link]
[Link][index].isIsolated
Description
If true, this object is isolated.
Type
Boolean
[Link]
[Link][index].layer
Description
The layer to which this item belongs.
Type
Layer; read-only.
[Link]
[Link][index].left
Description
The position of the left side of the item (in points, measured from the left side of the page).
Type
Number (double)
[Link]
[Link][index].length
Description
The length of this path in points.
Type
Number (double)
[Link]
[Link][index].locked
Description
If true, this item is locked.
Type
Boolean
[Link]
[Link][index].name
Description
The name of this item.
Type
String
[Link]
[Link][index].note
Description
The note assigned to this item.
Type
String
[Link]
[Link][index].opacity
Description
The opacity of the object. Range: 0.0 to 100.0
Type
Number (double)
[Link]
[Link][index].parent
Description
The parent of this object.
Type
Layer or GroupItem
[Link]
[Link][index].pathPoints
Description
The path points contained in this path item.
Type
PathPoints; read-only.
[Link]
[Link][index].pixelAligned
Description
true if this item is aligned to the pixel grid.
Type
Boolean
[Link]
[Link][index].polarity
Description
The polarity of the path.
Type
PolarityValues
[Link]
[Link][index].position
Description
The position (in points) of the top left corner of the pluginItem object in the format [x, y]. Does not include stroke
weight.
Type
Array of 2 numbers; read-only.
[Link]
[Link][index].resolution
Description
The resolution of the path in dots per inch (dpi).
Type
Number (double)
[Link]
[Link][index].selected
Description
If true, this item is selected.
Type
Boolean
[Link]
[Link][index].selectedPathPoints
Description
All of the selected path points in the path.
Type
PathPoints; read-only.
[Link]
[Link][index].sliced
Description
If true, the item sliced.
Default: false
Type
Boolean
[Link]
[Link][index].strokeCap
Description
The type of line capping.
Type
StrokeCap
[Link]
[Link][index].strokeColor
Description
The stroke color for the path.
Type
Color
[Link]
[Link][index].stroked
Description
If true, the path should be stroked.
Type
Boolean
[Link]
[Link][index].strokeDashes
Description
Dash lengths. Set to an empty object, {}, for a solid line.
Type
Object
[Link]
[Link][index].strokeDashOffset
Description
The default distance into the dash pattern at which the pattern should be started.
Type
Number (double)
[Link]
[Link][index].strokeJoin
Description
Type of joints for the path.
Type
StrokeJoin
[Link]
[Link][index].strokeMiterLimit
Description
When a default stroke join is set to mitered, this property specifies when the join will be converted to beveled (squared-
off ) by default. The default miter limit of 4 means that when the length of the point reaches four times the stroke
weight, the join switches from a miter join to a bevel join. A value of 1 specifies a bevel join. Range: 1 to 500. Default:
4
Type
Number (double)
[Link]
[Link][index].strokeOverprint
Description
If true, the art beneath a stroked object should be overprinted.
Type
Boolean
[Link]
[Link][index].strokeWidth
Description
The width of the stroke (in points).
Type
Number (double)
[Link]
[Link][index].tags
Description
The tags contained in this item.
Type
Tags; read-only.
[Link]
[Link][index].top
Description
The position of the top of the item (in points, measured from the bottom of the page).
Type
Number (double)
[Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String; read-only.
[Link]
[Link][index].uRL
Description
The value of the Adobe URL tag assigned to this item.
Type
String
[Link]
[Link][index].visibilityVariable
Description
The visibility variable bound to the item.
Type
Variable
[Link]
[Link][index].visibleBounds
Description
The visible bounds of the item including stroke width.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].width
Description
The width of the item.
Type
Number (double)
[Link]
[Link][index].wrapInside
Description
If true, the text frame object should be wrapped inside this object.
Type
Boolean
[Link]
[Link][index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double)
[Link]
[Link][index].wrapped
Description
If true, wrap text frame objects around this object (text frame must be above the object).
Type
Boolean
[Link]
[Link][index].zOrderPosition
Description
The position of this item within the stacking order of the group or layer (parent) that contains the item.
Type
Number; read-only.
104.1.2 Methods
[Link]()
[Link][index].duplicate([relativeObject][, insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
PathItem
[Link]()
[Link][index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
PathItem
[Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
[Link]()
[Link][index].resize(scaleX, scaleY[,changePositions][,
changeFillPatterns][,changeFillGradients][,changeStrokePattern][,changeLineWidths][,
scaleAbout])
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
[Link]()
[Link][index].rotate(angle[,changePositions][,changeFillPatterns][,
changeFillGradients][,changeStrokePattern][,rotateAbout])
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
Returns
Nothing.
[Link]()
[Link][index].setEntirePath(pathPoints)
Description
Sets the path using an array of [x, y] coordinate pairs.
Parameters
Returns
Nothing.
[Link]()
[Link][index].transform(transformationMatrix[, changePositions][,
changeFillPatterns][, changeFillGradients][, changeStrokePattern][, changeLineWidths][,
transformAbout])
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
[Link]()
Returns
Nothing.
[Link]()
[Link][index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
104.1.3 Example
// Sets the stroke and fill of a path item to colors of a randomly selected swatch
if ([Link] > 0 && [Link] > 0) {
var doc = [Link];
[Link] = true;
(continues on next page)
104.2 PlacedItem
[Link][index
Description
An artwork item placed in a document as a linked file.
For example, an artwork object created using the File > Place command in Illustrator or using the add() method
of the placedItems collection object is a placed item.
For information, see PlacedItems.
104.2.1 Properties
[Link]
[Link][index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout.
Type
KnockoutState
[Link]
[Link][index].blendingMode
Description
The blend mode used when compositing an object.
Type
BlendModes
[Link]
[Link][index].boundingBox
Description
The dimensions of the placed art item regardless of transformations.
Type
Array of 4 numbers
[Link]
[Link][index].contentVariable
Description
The content variable bound to the item.
Type
Variable
[Link]
[Link][index].controlBounds
Description
The bounds of the object including stroke width and controls.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].editable
Description
If true, this item is editable.
Type
Boolean; read-only.
[Link]
[Link][index].file
Description
The file containing the artwork.
Type
File; read-only.
[Link]
[Link][index].geometricBounds
Description
The bounds of the object excluding stroke width.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].height
Description
The height of the group item.
Type
Number (double)
[Link]
[Link][index].hidden
Description
If true, this item is hidden.
Type
Boolean
[Link]
[Link][index].isIsolated
Description
If true, this object is isolated.
Type
Boolean
[Link]
[Link][index].layer
Description
The layer to which this item belongs.
Type
Layer; read-only.
[Link]
[Link][index].left
Description
The position of the left side of the item (in points, measured from the left side of the page).
Type
Number (double)
[Link]
[Link][index].locked
Description
If true, this item is locked.
Type
Boolean
[Link]
[Link][index].matrix
Description
The transformation matrix of the placed artwork.
Type
Matrix
[Link]
[Link][index].name
Description
The name of this item.
Type
String
[Link]
[Link][index].note
Description
The note assigned to this item.
Type
String
[Link]
[Link][index].opacity
Description
The opacity of the object. Range: 0.0 to 100.0
Type
Number (double)
[Link]
[Link][index].parent
Description
The parent of this object.
Type
Layer or GroupItem
[Link]
[Link][index].position
Description
The position (in points) of the top left corner of the pluginItem object in the format [x, y]. Does not include stroke
weight.
Type
Array of 2 numbers; read-only.
[Link]
[Link][index].selected
Description
If true, this item is selected.
Type
Boolean
[Link]
[Link][index].sliced
Description
If true, the item sliced.
Default: false
Type
Boolean
[Link]
[Link][index].tags
Description
The tags contained in this item.
Type
Tags; read-only.
[Link]
[Link][index].top
Description
The position of the top of the item (in points, measured from the bottom of the page).
Type
Number (double)
[Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String; read-only.
[Link]
[Link][index].uRL
Description
The value of the Adobe URL tag assigned to this item.
Type
String
[Link]
[Link][index].visibilityVariable
Description
The visibility variable bound to the item.
Type
Variable
[Link]
[Link][index].visibleBounds
Description
The visible bounds of the item including stroke width.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].width
Description
The width of the item.
Type
Number (double)
[Link]
[Link][index].wrapInside
Description
If true, the text frame object should be wrapped inside this object.
Type
Boolean
[Link]
[Link][index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double)
[Link]
[Link][index].wrapped
Description
If true, wrap text frame objects around this object (text frame must be above the object).
Type
Boolean
[Link]
[Link][index].zOrderPosition
Description
The position of this item within the stacking order of the group or layer (parent) that contains the item.
Type
Number; read-only.
104.2.2 Methods
[Link]()
[Link][index].duplicate([relativeObject][, insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
PlacedItem
[Link]()
[Link][index].embed()
Description
Embeds this art in the document. Converts the art to art item objects as needed and deletes this object.
Returns
Nothing.
[Link]()
[Link][index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
PlacedItem
[Link]()
[Link][index].relink(linkFile)
Description
Relinks the art object with the file that defines its content.
Parameters
Returns
Nothing.
[Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
[Link]()
[Link][index].resize(scaleX, scaleY[,changePositions][,
changeFillPatterns][,changeFillGradients][,changeStrokePattern][,changeLineWidths][,
scaleAbout])
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
[Link]()
[Link][index].rotate(angle[,changePositions][,
changeFillPatterns][,changeFillGradients][,changeStrokePattern][,rotateAbout])
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
Returns
Nothing.
[Link]
[Link][index].trace()
Description
Converts the raster art for this object to vector art, using default options.
Reorders the raster art into the source art of a plug-in group, and converts it into a group of filled and/or stroked paths
that resemble the original image.
Creates and returns a PluginItem object that references a TracingObject object.
Returns
PluginItem
[Link]()
[Link][index].transform(transformationMatrix[, changePositions][,
changeFillPatterns][, changeFillGradients][, changeStrokePattern][, changeLineWidths][,
transformAbout])
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
[Link]()
Returns
Nothing.
[Link]()
[Link][index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
104.2.3 Example
104.3 PluginItem
[Link][index
Description
An art item created by an Illustrator plug-in.
Scripts can create a plug-in item using [Link] or [Link](), and can copy existing plug-in items
using the duplicate method, but cannot create PluginItem objects directly.
104.3.1 Properties
[Link]
[Link][index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout.
Type
KnockoutState
[Link]
[Link][index].blendingMode
Description
The blend mode used when compositing an object.
Type
BlendModes
[Link]
[Link][index].controlBounds
Description
The bounds of the object including stroke width and controls.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].editable
Description
If true, this item is editable.
Type
Boolean; read-only.
[Link]
[Link][index].geometricBounds
Description
The bounds of the object excluding stroke width.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].height
Description
The height of the group item.
Type
Number (double)
[Link]
[Link][index].hidden
Description
If true, this item is hidden.
Type
Boolean
[Link]
[Link][index].isIsolated
Description
If true, this object is isolated.
Type
Boolean
[Link]
[Link][index].isTracing
Description
If true, this plug-in group represents a vector art item created by tracing a raster art item.
The tracing property contains the tracing object associated with the options used to create it.
Type
Boolean
[Link]
[Link][index].layer
Description
The layer to which this item belongs.
Type
Layer; read-only.
[Link]
[Link][index].left
Description
The position of the left side of the item (in points, measured from the left side of the page).
Type
Number (double)
[Link]
[Link][index].locked
Description
If true, this item is locked.
Type
Boolean
[Link]
[Link][index].name
Description
The name of this item.
Type
String
[Link]
[Link][index].note
Description
The note assigned to this item.
Type
String
[Link]
[Link][index].opacity
Description
The opacity of the object. Range: 0.0 to 100.0
Type
Number (double)
[Link]
[Link][index].parent
Description
The parent of this object.
Type
Layer or GroupItem
[Link]
[Link][index].position
Description
The position (in points) of the top left corner of the pluginItem object in the format [x, y]. Does not include stroke
weight.
Type
Array of 2 numbers; read-only.
[Link]
[Link][index].selected
Description
If true, this item is selected.
Type
Boolean
[Link]
[Link][index].sliced
Description
If true, the item sliced.
Default: false
Type
Boolean
[Link]
[Link][index].tags
Description
The tags contained in this item.
Type
Tags; read-only.
[Link]
[Link][index].top
Description
The position of the top of the item (in points, measured from the bottom of the page).
Type
Number (double)
[Link]
[Link][index].tracing
Description
When this plug-in group was created by tracing (isTracing is true), the tracing object associated with the options
used to create it.
Type
TracingObject
[Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String; read-only.
[Link]
[Link][index].uRL
Description
The value of the Adobe URL tag assigned to this item.
Type
String
[Link]
[Link][index].visibilityVariable
Description
The visibility variable bound to the item.
Type
Variable
[Link]
[Link][index].visibleBounds
Description
The visible bounds of the item including stroke width.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].width
Description
The width of the item.
Type
Number (double)
[Link]
[Link][index].wrapInside
Description
If true, the text frame object should be wrapped inside this object.
Type
Boolean
[Link]
[Link][index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double)
[Link]
[Link][index].wrapped
Description
If true, wrap text frame objects around this object (text frame must be above the object).
Type
Boolean
[Link]
[Link][index].zOrderPosition
Description
The position of this item within the stacking order of the group or layer (parent) that contains the item.
Type
Number; read-only.
104.3.2 Methods
[Link]()
[Link][index].duplicate([relativeObject][, insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
PluginItem
[Link]()
[Link][index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
PluginItem
[Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
[Link]()
[Link][index].resize(scaleX, scaleY[,changePositions][,
changeFillPatterns][,changeFillGradients][,changeStrokePattern][,changeLineWidths][,
scaleAbout])
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
[Link]()
[Link][index].rotate(angle[,changePositions][,
changeFillPatterns][,changeFillGradients][,changeStrokePattern][,rotateAbout])
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
Returns
Nothing.
[Link]()
[Link][index].transform(transformationMatrix[, changePositions][,
changeFillPatterns][, changeFillGradients][, changeStrokePattern][, changeLineWidths][,
transformAbout])
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
[Link]()
Returns
Nothing.
[Link]()
[Link][index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
104.3.3 Example
104.4 RasterItem
[Link][index
Description
A bitmap art item in a document. A script can create a raster item from an external file, or by copying an existing raster
item with the duplicate method.
104.4.1 Properties
[Link]
[Link][index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout.
Type
KnockoutState
[Link]
[Link][index].bitsPerChannel
Description
The number of bits per channel.
Type
Number (long); read-only.
[Link]
[Link][index].blendingMode
Description
The blend mode used when compositing an object.
Type
BlendModes
[Link]
[Link][index].boundingBox
Description
The dimensions of the placed art item regardless of transformations.
Type
Array of 4 numbers
[Link]
[Link][index].channels
Description
The number of channels.
Type
Number (long); read-only.
[Link]
[Link][index].colorants
Description
The colorants used in the raster art.
Type
Array of string; read-only.
[Link]
[Link][index].colorizedGrayscale
Description
If true, the raster art is a colorized grayscale image.
Type
Boolean; read-only.
[Link]
[Link][index].contentVariable
Description
The content variable bound to the item.
Type
Variable
[Link]
[Link][index].controlBounds
Description
The bounds of the object including stroke width and controls.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].editable
Description
If true, this item is editable.
Type
Boolean; read-only.
[Link]
[Link][index].embedded
Description
If true, the raster art item is embedded in the illustration.
Type
Boolean
[Link]
[Link][index].file
Description
The file containing the artwork.
Type
File; read-only.
[Link]
[Link][index].geometricBounds
Description
The bounds of the object excluding stroke width.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].height
Description
The height of the group item.
Type
Number (double)
[Link]
[Link][index].hidden
Description
If true, this item is hidden.
Type
Boolean
[Link]
[Link][index].imageColorSpace
Description
The color space of the raster image.
Type
ImageColorSpace; read-only.
[Link]
[Link][index].isIsolated
Description
If true, this object is isolated.
Type
Boolean
[Link]
[Link][index].layer
Description
The layer to which this item belongs.
Type
Layer; read-only.
[Link]
[Link][index].left
Description
The position of the left side of the item (in points, measured from the left side of the page).
Type
Number (double)
[Link]
[Link][index].locked
Description
If true, this item is locked.
Type
Boolean
[Link]
[Link][index].matrix
Description
The transformation matrix of the placed artwork.
Type
Matrix
[Link]
[Link][index].name
Description
The name of this item.
Type
String
[Link]
[Link][index].note
Description
The note assigned to this item.
Type
String
[Link]
[Link][index].opacity
Description
The opacity of the object. Range: 0.0 to 100.0
Type
Number (double)
[Link]
[Link][index].overprint
Description
If true, the raster art overprints.
Type
Boolean
[Link]
[Link][index].parent
Description
The parent of this object.
Type
Layer or GroupItem
[Link]
[Link][index].position
Description
The position (in points) of the top left corner of the rasterItem object in the format [x, y]. Does not include stroke
weight.
Type
Array of 2 numbers; read-only.
[Link]
[Link][index].selected
Description
If true, this item is selected.
Type
Boolean
[Link]
[Link][index].sliced
Description
If true, the item sliced.
Default: false
Type
Boolean
[Link]
[Link][index].status
Description
Status of the linked image.
Type
RasterLinkState
[Link]
[Link][index].tags
Description
The tags contained in this item.
Type
Tags; read-only.
[Link]
[Link][index].top
Description
The position of the top of the item (in points, measured from the bottom of the page).
Type
Number (double)
[Link]
[Link][index].transparent
Description
If true, the raster art is transparent.
Type
Boolean; read-only.
[Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String; read-only.
[Link]
[Link][index].uRL
Description
The value of the Adobe URL tag assigned to this item.
Type
String
[Link]
[Link][index].visibilityVariable
Description
The visibility variable bound to the item.
Type
Variable
[Link]
[Link][index].visibleBounds
Description
The visible bounds of the item including stroke width.
Type
Array of 4 numbers; read-only.
[Link]
[Link][index].width
Description
The width of the item.
Type
Number (double)
[Link]
[Link][index].wrapInside
Description
If true, the text frame object should be wrapped inside this object.
Type
Boolean
[Link]
[Link][index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double)
[Link]
[Link][index].wrapped
Description
If true, wrap text frame objects around this object (text frame must be above the object).
Type
Boolean
[Link]
[Link][index].zOrderPosition
Description
The position of this item within the stacking order of the group or layer (parent) that contains the item.
Type
Number; read-only.
104.4.2 Methods
[Link]()
[Link][index].colorize(rasterizeColor)
Description
Colorizes the raster item with a CMYK or RGB Color.
Parameters
Returns
Nothing.
[Link]()
[Link][index].duplicate([relativeObject][, insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
RasterItem
[Link]()
[Link][index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
RasterItem
[Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
[Link]()
[Link][index].resize(scaleX, scaleY[,changePositions][,
changeFillPatterns][,changeFillGradients][,changeStrokePattern][,changeLineWidths][,
scaleAbout])
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
[Link]()
[Link][index].rotate(angle[,changePositions][,
changeFillPatterns][,changeFillGradients][,changeStrokePattern][,rotateAbout])
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
Returns
Nothing.
[Link]()
[Link][index].trace()
Description
Converts the raster art for this object to vector art, using default options.
Reorders the raster art into the source art of a plug-in group, and converts it into a group of filled and/or stroked paths
that resemble the original image.
Creates and returns a PluginItem object that references a TracingObject object.
Returns
PluginItem
[Link]()
[Link][index].transform(transformationMatrix[, changePositions][,
changeFillPatterns][, changeFillGradients][, changeStrokePattern][, changeLineWidths][,
transformAbout])
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
[Link]()
Returns
Nothing.
[Link]()
[Link][index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
104.5 SymbolItem
[Link][index
Description
An art item made reusable by adding it to the Symbols palette.
A SymbolItem is linked to the Symbol from which it was created and changes if you modify the associated Symbol
object.
104.5.1 Properties
[Link]
[Link][index].artworkKnockout
Description
Is this object used to create a knockout, and if so, what kind of knockout.
Type
KnockoutState
[Link]
[Link][index].blendingMode
Description
The blend mode used when compositing an object.
Type
BlendModes
[Link]
[Link][index].controlBounds
Description
The bounds of the object including stroke width and controls.
Type
Array of 4 Numbers; read-only.
[Link]
[Link][index].editable
Description
If true, this item is editable.
Type
Boolean; read-only.
[Link]
[Link][index].geometricBounds
Description
The bounds of the object excluding stroke width.
Type
Array of 4 Numbers; read-only.
[Link]
[Link][index].height
Description
The height of the group item.
Type
Number (double)
[Link]
[Link][index].hidden
Description
If true, this item is hidden.
Type
Boolean
[Link]
[Link][index].isIsolated
Description
If true, this object is isolated.
Type
Boolean
[Link]
[Link][index].layer
Description
The layer to which this item belongs.
Type
Layer; read-only.
[Link]
[Link][index].left
Description
The position of the left side of the item (in points, measured from the left side of the page).
Type
Number (double)
[Link]
[Link][index].locked
Description
If true, this item is locked.
Type
Boolean
[Link]
[Link][index].name
Description
The name of this item.
Type
String
[Link]
[Link][index].note
Description
The note assigned to this item.
Type
String
[Link]
[Link][index].opacity
Description
The opacity of the object. Range: 0.0 to 100.0
Type
Number (double)
[Link]
[Link][index].parent
Description
The parent of this object.
Type
Layer or GroupItem; read-only.
[Link]
[Link][index].position
Description
The position (in points) of the top left corner of the symbolItem object in the format [x, y]. Does not include stroke
weight.
Type
Array of 2 Numbers
[Link]
[Link][index].selected
Description
If true, this item is selected.
Type
Boolean
[Link]
[Link][index].sliced
Description
If true, the item sliced. Default: false
Type
Boolean
[Link]
[Link][index].symbol
Description
The symbol that was used to create this symbolItem.
Type
Symbol
[Link]
[Link][index].tags
Description
The tags contained in this item.
Type
Tags; read-only.
[Link]
[Link][index].top
Description
The position of the top of the item (in points, measured from the bottom of the page).
Type
Number (double)
[Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String; read-only.
[Link]
[Link][index].uRL
Description
The value of the Adobe URL tag assigned to this item.
Type
String
[Link]
[Link][index].visibilityVariable
Description
The visibility variable bound to the item.
Type
Variable
[Link]
[Link][index].visibleBounds
Description
The visible bounds of the item including stroke width.
Type
Array of 4 Numbers; read-only.
[Link]
[Link][index].width
Description
The width of the item.
Type
Number (double)
[Link]
[Link][index].wrapInside
Description
If true, the text frame object should be wrapped inside this object.
Type
Boolean
[Link]
[Link][index].wrapOffset
Description
The offset to use when wrapping text around this object.
Type
Number (double)
[Link]
[Link][index].wrapped
Description
If true, wrap text frame objects around this object (text frame must be above the object).
Type
Boolean
[Link]
[Link][index].zOrderPosition
Description
The position of this item within the stacking order of the group or layer (parent) that contains the item.
Type
Number; read-only.
104.5.2 Methods
[Link]()
[Link][index].duplicate([relativeObject][, insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
SymbolItem
[Link]()
[Link][index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
SymbolItem
[Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
[Link]()
[Link][index].resize(scaleX, scaleY[,changePositions][,
changeFillPatterns][,changeFillGradients][,changeStrokePattern][,changeLineWidths][,
scaleAbout])
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
[Link]()
[Link][index].rotate(angle[,changePositions][,
changeFillPatterns][,changeFillGradients][,changeStrokePattern][,rotateAbout])
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
Returns
Nothing.
[Link]()
[Link][index].transform(transformationMatrix[, changePositions][,
changeFillPatterns][, changeFillGradients][, changeStrokePattern][, changeLineWidths][,
transformAbout])
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
[Link]()
Returns
Nothing.
[Link]()
[Link][index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
104.6 TextFrameItem
[Link][index
Description
The basic art item for displaying text. From the user interface, this is text created with the Text tool. There are three
types of text art in Illustrator: point text, path text, and area text. The type is indicated by the text frame’s kind property.
When you create a text frame, you also create a Story object. However, threading text frames combines the frames into
a single story object. To thread frames, use the nextFrame or previousFrame property.
104.6.1 Properties
[Link]
[Link][index].anchor
Description
The position of the anchor point, the start of the base line for point text.
Type
Array of 2 numbers
[Link]
[Link][index].antialias
Description
The type of anti-aliasing to use in the text.
Type
TextAntialias
[Link]
[Link][index].characters
Description
All the characters in this text frame.
Type
Characters, read-only.
[Link]
[Link][index].columnCount
Description
The column count in the text frame (area text only).
Type
Number (long)
[Link]
[Link][index].columnGutter
Description
The column gutter in the text frame (area text only).
Type
Number (double)
[Link]
[Link][index].contents
Description
The text string.
Type
String
[Link]
[Link][index].contentVariable
Description
The content variable bound to this text frame item.
Type
Variable
[Link]
[Link][index].endTValue
Description
The end position of text along a path, as a value relative to the path’s segments (path text only).
Type
Number (double)
[Link]
[Link][index].flowLinksHorizontally
Description
If true, flow text between linked frames horizontally first (area text only).
Type
Boolean
[Link]
[Link][index].insertionPoints
Description
All the insertion points in this text range.
Type
InsertionPoints, read-only.
[Link]
[Link][index].kind
Description
The type of a text frame item (area, path or point).
Type
TextType, read-only.
[Link]
[Link][index].lines
Description
All the lines in this text frame.
Type
Lines, read-only.
[Link]
[Link][index].matrix
Description
The transformation matrix for this text frame.
Type
Matrix, read-only.
[Link]
[Link][index].nextFrame
Description
The linked text frame following this one.
Type
TextFrameItem
[Link]
[Link][index].opticalAlignment
Description
If true, the optical alignment feature is active.
Type
Boolean
[Link]
[Link][index].orientation
Description
The orientation of the text.
Type
TextOrientation
[Link]
[Link][index].paragraphs
Description
All the paragraphs in this text frame.
Type
Paragraphs, read-only.
[Link]
[Link][index].parent
Description
The parent of this object.
Type
Layer or GroupItem, read-only.
[Link]
[Link][index].previousFrame
Description
The linked text frame preceding this one.
Type
TextFrameItem
[Link]
[Link][index].rowCount
Description
The row count in the text frame (area text only).
Type
Number (long)
[Link]
[Link][index].rowGutter
Description
The row gutter in the text frame (area text only).
Type
Number (double)
[Link]
[Link][index].spacing
Description
The amount of spacing.
Type
Number (double)
[Link]
[Link][index].startTValue
Description
The start position of text along a path, as a value relative to the path’s segments (path text only).
Type
Number (double)
[Link]
[Link][index].story
Description
The story to which the text frame belongs.
Type
Story, read-only.
[Link]
[Link][index].textPath
Description
The path item associated with the text frame. Note: Valid only when kind is area or path.
Type
TextPath
[Link]
[Link][index].textRange
Description
The text range of the text frame.
Type
TextRange, read-only.
[Link]
[Link][index].textRanges
Description
All the text in this text frame.
Type
TextRanges, read-only.
[Link]
[Link][index].textSelection
Description
The selected text range(s) in the text frame.
Type
Array of TextRange, read-only.
[Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String, read-only.
[Link]
[Link][index].words
Description
All the words in this text frame.
Type
Words, read-only.
104.6.2 Methods
[Link]()
[Link][index].convertAreaObjectToPointObject()
Description
Converts the area-type text frame to a point-type text frame.
Returns
TextFrameItem
[Link]()
[Link][index].convertPointObjectToAreaObject()
Description
Converts the point-type text frame to an area-type text frame.
Returns
TextFrameItem
[Link]()
[Link][index].createOutline()
Description
Converts the text in the text frame to outlines.
Returns
GroupItem
[Link]()
[Link][index].duplicate([relativeObject] [,insertionLocation])
Description
Creates a duplicate of the selected object.
Parameters
Returns
TextRange
[Link]()
[Link][index].move(relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
TextRange
[Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
[Link]()
[Link][index].resize(scaleX, scaleY[,changePositions][,
changeFillPatterns][,changeFillGradients][,changeStrokePattern][,changeLineWidths][,
scaleAbout])
Description
Scales the art item where scaleX is the horizontal scaling factor and scaleY is the vertical scaling factor. 100.0 =
100%.
Parameters
Returns
Nothing.
[Link]()
[Link][index].rotate(angle[,changePositions][,
changeFillPatterns][,changeFillGradients][,changeStrokePattern][,rotateAbout])
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
Returns
Nothing.
[Link]()
[Link][index].transform(transformationMatrix[, changePositions][,
changeFillPatterns][, changeFillGradients][, changeStrokePattern][, changeLineWidths][,
transformAbout])
Description
Transforms the art item by applying a transformation matrix.
Parameters
Returns
Nothing.
[Link]()
Returns
Nothing.
[Link]()
[Link][index].zOrder(zOrderCmd)
Description
Arranges the art item’s position in the stacking order of the group or layer (parent) of this object.
Parameters
Returns
Nothing.
104.6.3 Example
// Get the parent of the text art so new text art items
// can be inserted in the same group or layer
dupSrc = selectedItems[0];
textContainer = [Link];
You can reference page items through the PageItems property in a Document, Layer, or GroupItem.
When you access an individual item in one of these collections, the reference is a page item of one of a particular type.
For example, if you use PageItems to reference a graph item, the typename value of that object is GraphItem.
104.7 Properties
104.7.1 [Link]
[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
104.7.2 [Link]
[Link]
Description
The parent of this object.
Type
Object, read-only.
104.7.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only.
104.8 Methods
104.8.1 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
PageItem
104.8.2 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
PageItem
104.8.3 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
104.9 Example
// Gets all file-references in the current document using the pageItems object,
// then displays them in a new document
if ([Link] > 0) {
var fileReferences = new Array();
var sourceDoc = [Link];
FIVE
PAPER
[Link]
Description
Associates paper information with a paper name. Paper objects are used by Printer objects.
105.1 Properties
105.1.1 [Link]
[Link]
Description
The paper name.
Type
String.
105.1.2 [Link]
[Link]
Description
The paper information.
Type
PaperInfo
601
Illustrator Scripting Guide, Release 0.0.1
105.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
SIX
PAPERINFO
printerList[printerIndex].[Link][paperSizeIndex].paperInfo
Description
Paper information for use in printing documents.
106.1 Properties
106.1.1 [Link]
printerList[printerIndex].[Link][paperSizeIndex].[Link]
Description
If true, it is a custom paper.
Type
Boolean.
106.1.2 [Link]
printerList[printerIndex].[Link][paperSizeIndex].[Link]
Description
The paper’s height in points.
Type
Number (double).
603
Illustrator Scripting Guide, Release 0.0.1
106.1.3 [Link]
printerList[printerIndex].[Link][paperSizeIndex].[Link]
Description
The imageable area.
Type
Array of 4 numbers.
106.1.4 [Link]
printerList[printerIndex].[Link][paperSizeIndex].[Link]
Description
The class name of the object.
Type
String, read-only.
106.1.5 [Link]
printerList[printerIndex].[Link][paperSizeIndex].[Link]
Description
The paper’s width in points.
Type
Number (double).
106.2 Example
// Displays the papers and paper sizes available for the 2nd printer in a text frame
SEVEN
PARAGRAPHATTRIBUTES
[Link][index].paragraphs[index].paragraphAttributes
Description
Specifies the properties and attributes of a paragraph contained in a text frame.
Note: Paragraph attributes do not have default values, and are undefined untile xplicitly set.
107.1 Properties
107.1.1 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
autoLeadingAmount
Description
Auto leading amount expressed as a percentage.
Type
Number (double).
107.1.2 [Link]
[Link][index].paragraphs[index].[Link]
Description
If true, BunriKinshi is enabled.
Type
Boolean.
607
Illustrator Scripting Guide, Release 0.0.1
107.1.3 [Link]
[Link][index].paragraphs[index].[Link]
Description
The Burasagari type.
Type
BurasagariTypeEnum
107.1.4 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
desiredGlyphScaling
Description
Desired glyph scaling, expressed as a percentage of the default character width. Range: 50.0 to 200.0. At 100.0, the
width of characters is not changed.
Type
Number (double).
107.1.5 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
desiredLetterSpacing
Description
Desired letter, spacing expressed as a percentage of the default kerning or tracking Range: -100.0 to 500.0. At 0, no
space is added between letters. At 100.0, an entire space width is added between letters.
Type
Number (double).
107.1.6 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
desiredWordSpacing
Description
Desired word spacing, expressed as a percentage of the default space for the font. Range: 0.0 to 1000.0; at 100.00. No
space is added between words.
Type
Number (double).
107.1.7 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
everyLineComposer
Description
If true, the Every-line Composer is enabled. If false, the Single-line Composer is enabled.
Type
Boolean.
107.1.8 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
firstLineIndent
Description
First line left indent in points.
Type
Number (double).
107.1.9 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
hyphenateCapitalizedWords
Description
If true, hyphenation is enabled for capitalized words.
Type
Boolean.
107.1.10 [Link]
[Link][index].paragraphs[index].[Link]
Description
If true, hyphenation is enabled for the paragraph.
Type
Boolean.
107.1.11 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
hyphenationPreference
Description
Hyphenation preference scale for better spacing (0) or fewer hyphens (1). Range: 0.0 to 1.0.
Type
Number (double).
107.1.12 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
hyphenationZone
Description
The distance (in points) from the right edge of the paragraph that marks the part of the line where hyphenation is not
allowed.
Type
Number (double).
107.1.13 [Link]
[Link][index].paragraphs[index].[Link]
Description
Paragraph justification.
Type
Justification
107.1.14 [Link]
[Link][index].paragraphs[index].[Link]
Description
The Kinsoku Shori name.
Type
String.
107.1.15 [Link]
[Link][index].paragraphs[index].[Link]
Description
The preferred Kinsoku order.
Type
KinsokuOrderEnum
107.1.16 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
kurikaeshiMojiShori
Description
If true, KurikaeshiMojiShori is enabled.
Type
Boolean.
107.1.17 [Link]
[Link][index].paragraphs[index].[Link]
Description
Auto leading type.
Type
AutoLeadingType
107.1.18 [Link]
[Link][index].paragraphs[index].[Link]
Description
The left indent of margin in points.
Type
Number (double).
107.1.19 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
maximumConsecutiveHyphens
Description
Maximum number of consecutive hyphenated lines.
Type
Number (long).
107.1.20 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
maximumGlyphScaling
Description
Maximum glyph scaling, expressed as a percentage of the default character width. Range: 50.0 to 200.0; at 100.0. The
width of characters is not changed.
Type
Number (double).
107.1.21 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
maximumLetterSpacing
Description
Maximum letter spacing, expressed as a percentage of the default kerning or tracking Range: -100.0 to 500.0; at 0. No
space is added between letters. At 100.0, an entire space width is added between letters.
Type
Number (double).
107.1.22 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
maximumWordSpacing
Description
Maximum word spacing, expressed as a percentage of the default space for the font. Range: 0.0 to 1000.0; at 100.00.
No space is added between words.
Type
Number (double).
107.1.23 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
minimumAfterHyphen
Description
Minimum number of characters after a hyphen.
Type
Number (long).
107.1.24 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
minimumBeforeHyphen
Description
Minimum number of characters before a hyphen.
Type
Number (long).
107.1.25 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
minimumGlyphScaling
Description
Minimum glyph scaling, expressed as a percentage of the default character width. Range: 50.0 to 200.0. At 100.0, the
width of characters is not changed.
Type
Number (double).
107.1.26 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
minimumHyphenatedWordSize
Description
Minimum number of characters for a word to be hyphenated.
Type
Number (long).
107.1.27 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
minimumLetterSpacing
Description
Minimum letter spacing, expressed as a percentage of the default kerning or tracking Range: -100.0 to 500.0; at 0. No
space is added between letters. At 100.0, an entire space width is added between letters.
Type
Number (double).
107.1.28 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
minimumWordSpacing
Description
Minimum word spacing, expressed as a percentage of the default space for the font. Range: 0.0 to 1000.0; at 100.00.
No space is added between words.
Type
Number (double).
107.1.29 [Link]
[Link][index].paragraphs[index].[Link]
Description
The Mojikumi name.
Type
String.
107.1.30 [Link]
[Link][index].paragraphs[index].[Link]
Description
The object’s container.
Type
Object, read-only.
107.1.31 [Link]
[Link][index].paragraphs[index].[Link]
Description
Right indent of margin in points.
Type
Number (double).
107.1.32 [Link]
[Link][index].paragraphs[index].[Link]
Description
If true, Roman hanging punctuation is enabled.
Type
Boolean.
107.1.33 [Link]
[Link][index].paragraphs[index].paragraphAttributes.
singleWordJustification
Description
Single word justification.
Type
Justification
107.1.34 [Link]
[Link][index].paragraphs[index].[Link]
Description
Spacing after paragraph in points.
Type
Number (double).
107.1.35 [Link]
[Link][index].paragraphs[index].[Link]
Description
Spacing before paragraph in points.
Type
Number (double).
107.1.36 [Link]
[Link][index].paragraphs[index].[Link]
Description
Tab stop settings.
Type
TabStopInfo
107.1.37 [Link]
[Link][index].paragraphs[index].[Link]
Description
The class name of the object.
Type
String, read-only.
107.2 Example
EIGHT
PARAGRAPHS
[Link][index].paragraphs
Description
A collection of TextRange objects, with each TextRange representing a paragraph. The elements are not named; you
must access them by index.
108.1 Properties
108.1.1 [Link]
[Link][index].[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
108.1.2 [Link]
[Link][index].[Link]
Description
The parent of this object.
Type
Object, read-only.
619
Illustrator Scripting Guide, Release 0.0.1
108.1.3 [Link]
[Link][index].[Link]
Description
The class name of the referenced object.
Type
String, read-only.
108.2 Methods
108.2.1 [Link]()
[Link][index].[Link](contents [,relativeObject] [,
insertionLocation])
Description
Adds a new paragraph with specified text contents at the specified location in the current document. If location is not
specified, adds the new paragraph to the containing text frame after the current text selection or insertion point.
Parameters
Returns
TextRange
108.2.2 [Link]()
[Link][index].[Link](contents)
Description
Adds a new paragraph with specified text contents before the current text selection or insertion point.
Parameters
Returns
TextRange
108.2.3 [Link]()
[Link][index].[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
TextRange
108.2.4 [Link]()
[Link][index].[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
108.3 Example
NINE
PARAGRAPHSTYLE
[Link][index
Description
Associates character and paragraph attributes with a style name. The style object can be used to apply those attributes
to the text in a TextFrame object. See Creating and applying a paragraph style example.
109.1 Properties
109.1.1 [Link]
[Link][[Link]
Description
The character properties for the text range.
Type
CharacterAttributes, read-only.
109.1.2 [Link]
[Link][[Link]
Description
The paragraph style’s name.
Type
String.
623
Illustrator Scripting Guide, Release 0.0.1
109.1.3 [Link]
[Link][[Link]
Description
The paragraph properties for the text range.
Type
CharacterAttributes, read-only.
109.1.4 [Link]
[Link][[Link]
Description
The object’s container.
Type
Object, read-only.
109.1.5 [Link]
[Link][[Link]
Description
The class name of the object.
Type
String, read-only.
109.2 Methods
109.2.1 [Link]()
[Link][[Link](textItem [,clearingOverrides])
Description
Applies this paragraph style to the specified text item.
Parameters
Returns
Nothing.
109.2.2 [Link]()
[Link][[Link]()
Description
Deletes the object.
Returns
Nothing.
PARAGRAPHSTYLES
[Link]
Description
A collection of ParagraphStyle objects.
110.1 Properties
110.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
110.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
627
Illustrator Scripting Guide, Release 0.0.1
110.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
110.2 Methods
110.2.1 [Link]()
[Link](name)
Description
Creates a named paragraph style.
Parameters
Returns
CharacterAttributes
110.2.2 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
CharacterAttributes
110.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
CharacterAttributes
110.2.4 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
110.3 Example
ONE
PATHITEMS
[Link]
Description
A collection of PathItem objects.
The methods ellipse, polygon, rectangle, roundedRectangle, and star allow you to create complex path items
using straightforward parameters.
If you do not provide any parameters when calling these methods, default values are used.
111.1 Properties
111.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
111.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
631
Illustrator Scripting Guide, Release 0.0.1
111.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
111.2 Methods
111.2.1 [Link]()
[Link]()
Description
Creates a new object.
Returns
PathItem
111.2.2 [Link]()
Parameter Value
top 100 pt.
left 100 pt.
width 50 pt.
height 100 pt.
reversed false
Parameters
Returns
PathItem
111.2.3 [Link]()
[Link](name)
Description
Gets the first element in the collection with the specified name.
Parameters
Returns
PathItem
111.2.4 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
PathItem
111.2.5 [Link]()
Parameter Value
centerX 200 pt.
centerY 300 pt.
radius 50 pt.
sides 8
reversed false
Parameters
Returns
PathItem
111.2.6 [Link]()
Returns
PathItem
111.2.7 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing
111.2.8 [Link]()
Parameter Value
horizontalRadius 15 pt.
verticalRadius 20 pt.
reversed false
Parameters
Returns
PathItem
111.2.9 [Link]()
Parameter Value
centerX 200 pt.
centerY 300 pt.
radius 50 pt.
innerRadius 20 pt.
points 5
reversed false
Parameters
Returns
PathItem
111.3 Example
TWO
PATHPOINT
[Link][index].pathPoints[index
Description
A point on a specific path.
Each path point is made up of an anchor point (anchor) and a pair of handles (leftDirection and rightDirection).
112.1 Properties
112.1.1 [Link]
[Link][index].pathPoints[index].anchor
Description
The position of this point’s anchor point.
Type
Array of 2 numbers
112.1.2 [Link]
[Link][index].pathPoints[index].leftDirection
Description
The position of this path point’s in control point.
Type
Array of 2 numbers
639
Illustrator Scripting Guide, Release 0.0.1
112.1.3 [Link]
[Link][index].pathPoints[index].parent
Description
The path item that contains this path point.
Type
PathItem; read-only.
112.1.4 [Link]
[Link][index].pathPoints[index].pointType
Description
The type of path point, either a curve or a corner. Any point can considered a corner point.
Setting the type to a corner forces the left and right direction points to be on a straight line when the user attempts to
modify them in the user interface.
Type
PointType
112.1.5 [Link]
[Link][index].pathPoints[index].rightDirection
Description
The position of this path point’s out control point.
Type
Array of 2 numbers
112.1.6 [Link]
[Link][index].pathPoints[index].selected
Description
Are points of this path point selected, and if so, which ones.
Type
PathPointSelection
112.1.7 [Link]
[Link][index].pathPoints[index].typename
Description
The class name of the referenced object.
Type
String; read-only.
112.2 Methods
112.2.1 [Link]()
[Link][index].pathPoints[index].remove()
Description
Removes the referenced point from the path.
Returns
Nothing.
THREE
PATHPOINTS
[Link][index].pathPoints
Description
A collection of PathPoint objects in a specific path.
The elements are not named; you must access them by index.
113.1 Properties
113.1.1 [Link]
[Link][index].[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
113.1.2 [Link]
[Link][index].[Link]
Description
The object’s container.
Type
Object, read-only.
643
Illustrator Scripting Guide, Release 0.0.1
113.1.3 [Link]
[Link][index].[Link]
Description
The class name of the object.
Type
String, read-only.
113.2 Methods
113.2.1 [Link]()
[Link][index].[Link]()
Description
Creates a new object.
Returns
PathPoint
113.2.2 [Link]()
[Link][index].[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
PathPoint
113.2.3 [Link]()
[Link][index].[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
113.3 Example
FOUR
PATTERN
[Link][index
Description
An Illustrator pattern definition contained in a document.
Patterns are shown in the Swatches palette.
Each pattern is referenced by a PatternColor object, which defines the pattern’s appearance.
114.1 Properties
114.1.1 [Link]
[Link][index].name
Description
The pattern name.
Type
String
114.1.2 [Link]
[Link][index].parent
Description
The document that contains this pattern.
Type
Document, read-only.
647
Illustrator Scripting Guide, Release 0.0.1
114.1.3 [Link]
[Link][index].typename
Description
The class name of the object.
Type
String, read-only.
114.2 Methods
114.2.1 [Link]()
[Link][index].remove()
Description
Removes the referenced pattern from the document.
Returns
Nothing.
114.2.2 [Link]()
[Link][index].toString()
Description
Returns the object type of a referenced object. If the object has a name, also returns the name.
Returns
String
FIVE
PATTERNS
[Link]
Description
A collection of Pattern objects in a document.
115.1 Properties
115.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
115.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
649
Illustrator Scripting Guide, Release 0.0.1
115.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
115.2 Methods
115.2.1 [Link]()
[Link]()
Description
Creates a new object.
Returns
Pattern
115.2.2 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
Pattern
115.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Pattern
115.2.4 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
115.3 Example
SIX
PDFFILEOPTIONS
[Link]
Description
Options for opening a PDF file, used with the [Link]() method.
All properties are optional.
116.1 Properties
116.1.1 [Link]
[Link]
Description
What page should be used when opening a multipage document.
Default: 1
Type
Number (long)
116.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object; read-only.
653
Illustrator Scripting Guide, Release 0.0.1
116.1.3 [Link]
[Link]
Description
Which box should be used when placing a multipage document.
Default: [Link]
Type
PDFBoxType
116.1.4 [Link]
[Link]
Description
The class name of the object.
Type
String; read-only.
116.2 Example
if (fileRef != null) {
var docRef = open(fileRef, [Link]);
}
SEVEN
PDFSAVEOPTIONS
new PDFSaveOptions()
Description
Options for saving a document as an Adobe PDF file, used with the [Link]() method.
All properties are optional.
117.1 Properties
117.1.1 [Link]
[Link]
Description
Optional. Create Acrobat® layers from top-level layers. Acrobat 6 only.
Default: false
Type
Boolean
117.1.2 [Link]
[Link]
Description
Optional. This is considered for multi-asset extraction, which specifies the artboard range. An empty string extracts all
the artboards.
Default: empty string
Type
String
655
Illustrator Scripting Guide, Release 0.0.1
117.1.3 [Link]
[Link]
Description
Optional. Link 4 bleed values.
Default: true
Type
Boolean
117.1.4 [Link]
[Link]
Description
The bleed offset rectangle.
Type
Array of 4 numbers
117.1.5 [Link]
[Link]
Description
Optional. Draw color bars.
Default: false
Type
Boolean
117.1.6 [Link]
[Link]
Description
Optional. The type of color bitmap compression used.
Default: [Link]
Type
CompressionQuality
117.1.7 [Link]
[Link]
Description
Optional. The PDF color conversion policy.
Default: [Link]
Type
ColorConversion
117.1.8 [Link]
[Link]
Description
Optional. The conversion target for color conversion.
Default: [Link]
Type
ColorDestination
117.1.9 [Link]
[Link]
Description
Optional. The color downsampling resolution in dots per inch (dpi). If 0, no downsampling is performed.
Default: 150.0
Type
Number (double)
117.1.10 [Link]
[Link]
Description
Optional. Downsample if the image’s resolution is above this value.
Default: 225.0
Type
Number (double)
117.1.11 [Link]
[Link]
Description
Optional. How color bitmap images should be resampled.
Default: [Link]
Type
DownsampleMethod
117.1.12 [Link]
[Link]
Description
Optional. The color profile to include.
Default: [Link]
Type
ColorProfile
117.1.13 [Link]
[Link]
Description
Optional. Tile size when compressing with JPEG2000.
Default: 256
Type
Number (long)
117.1.14 [Link]
[Link]
Description
Optional. The version of the Acrobat file format to create.
Default: PDFCompatibility.Acrobat5
Type
PDFCompatibility
117.1.15 [Link]
[Link]
Description
Optional. If true, the line art and text should be compressed.
Default: true
Type
Boolean
117.1.16 [Link]
[Link]
Description
Optional. A password string to open the document.
Default: no string
Type
String
117.1.17 [Link]
[Link]
Description
Optional. If true, enable accessing 128-bit.
Default: true
Type
Boolean
117.1.18 [Link]
[Link]
Description
Optional. If true, enable copying of text 128-bit.
Default: true
Type
Boolean
117.1.19 [Link]
[Link]
Description
Optional. If true, enable copying and accessing 40-bit.
Default: true
Type
Boolean
117.1.20 [Link]
[Link]
Description
Optional. If true, enable plaintext metadata 128-bit. Available only for Acrobat 6.
Default: false
Type
Boolean
117.1.21 [Link]
[Link]
Description
Optional. The printing flattener options.
Type
PrintFlattenerOptions
117.1.22 [Link]
[Link]
Description
Optional. The transparency flattener preset name.
Type
String.
117.1.23 [Link]
[Link]
Description
Optional. Include a subset of fonts when less than this percentage of characters is used in the document. Valid for
Illustrator 9 file format. Range: 0.0 to 100.0.
Default: 100.0
Type
Number (double)
117.1.24 [Link]
[Link]
Description
Optional. If true, thumbnail images are generated with the saved file.
Default: true
Type
Boolean
117.1.25 [Link]
[Link]
Description
Optional. Quality of grayscale bitmap compression.
Default: [Link]
Type
CompressionQuality
117.1.26 [Link]
[Link]
Description
Optional. Downsampling resolution in dots per inch (dpi). If 0, no downsampling is performed.
Default: 150.0
Type
Number (double)
117.1.27 [Link]
[Link]
Description
Optional. Downsample if the image’s resolution is above this value.
Default: 225.0
Type
Number (double)
117.1.28 [Link]
[Link]
Description
Optional. How grayscale bitmap images should be resampled
Default: [Link]
Type
DownsampleMethod
117.1.29 [Link]
[Link]
Description
Optional. Tile size when compressing with JPEG2000.
Default: 256
Type
Number (long)
117.1.30 [Link]
[Link]
Description
Optional. Type of monochrome bitmap compression used.
Default: [Link]
Type
MonochromeCompression
117.1.31 [Link]
[Link]
Description
Optional. Downsampling resolution in dots per inch (dpi). If 0, no downsampling is performed.
Default: 300
Type
Number (double)
117.1.32 [Link]
[Link]
Description
Optional. Downsample if the image’s resolution is above this value.
Default: 450.0
Type
Number (double)
117.1.33 [Link]
[Link]
Description
Optional. How monochrome bitmap images should be resampled.
Default: [Link]
Type
DownsampleMethod
117.1.34 [Link]
[Link]
Description
Optional. Custom offset in points for using the custom paper.
Default: 0.0
Type
Number (double)
117.1.35 [Link]
[Link]
Description
Optional. If true, the PDF document should be optimized for fast web viewing.
Default: false
Type
Boolean
117.1.36 [Link]
[Link]
Description
Optional. An optional comment to add to the PDF file, describing the intended printing condition.
Default: not included
Type
String
117.1.37 [Link]
[Link]
Description
Optional. The name of a registered printing condition.
Default: not included
Type
String
117.1.38 [Link]
[Link]
Description
Optional. If true, raw page information.
Default: false
Type
Boolean
117.1.39 [Link]
[Link]
Description
Optional. The page marks style.
Default: [Link]
Type
PageMarksTypes
117.1.40 [Link]
[Link]
Description
Optional. PDF security printing permission.
Default: PDFPrintAllowedEnum.PRINT128HIGHRESOLUTION
Type
PDFPrintAllowedEnum
117.1.41 [Link]
[Link]
Description
Optional. Security changes allowed.
Default: PDFChangeAllowedEnum.CHANGE128ANYCHANGES
Type
PDFChangesAllowedEnum
117.1.42 [Link]
[Link]
Description
Optional. Name of PDF preset to use.
Type
String
117.1.43 [Link]
[Link]
Description
Optional. The PDF standard with which this document complies.
Default: [Link]
Type
PDFXStandard
117.1.44 [Link]
[Link]
Description
Optional. A description of the PDF standard from the selected preset.
Type
String
117.1.45 [Link]
[Link]
Description
Optional. A password string to restrict editing security settings.
Default: no string
Type
String
117.1.46 [Link]
[Link]
Description
Optional. If true, Illustrator editing capabilities should be preserved when saving the document.
Default: true
Type
Boolean
117.1.47 [Link]
[Link]
Description
Optional. Flattening printer resolution.
Default: 800.0
Type
Number (double)
117.1.48 [Link]
[Link]
Description
Optional. If true, draw registration marks.
Default: false
Type
Boolean
117.1.49 [Link]
[Link]
Description
Optional. Require a password to open the document.
Default: false
Type
Boolean
117.1.50 [Link]
[Link]
Description
Optional. Use a password to restrict editing security settings.
Default: false
Type
Boolean
117.1.51 [Link]
[Link]
Description
Optional. If true, manual trapping has been prepared for the document.
Default: false
Type
Boolean
117.1.52 [Link]
[Link]
Description
Optional. Draw trim marks.
Default: false
Type
Boolean
117.1.53 [Link]
[Link]
Description
Optional. The trim mark weight.
Default: PDFTrimMarkWeight.TRIMMARKWEIGHT0125
Type
PDFTrimMarkWeight
117.1.54 [Link]
[Link]
Description
Optional. Read-only. The class name of the referenced object.
Type
String
117.1.55 [Link]
[Link]
Description
Optional. View PDF after saving.
Default: false
Type
Boolean
117.2 Example
if ([Link] > 0) {
var saveName = new File(dest);
saveOpts = new PDFSaveOptions();
[Link] = PDFCompatibility.ACROBAT5;
[Link] = true;
[Link] = true;
[Link](saveName, saveOpts);
}
}
EIGHT
PHOTOSHOPFILEOPTIONS
[Link]
Description
Options for opening a Photoshop file, used with the [Link]() method. All properties are optional.
118.1 Properties
118.1.1 [Link]
[Link]
Description
The parent of this object.
Type
Object; read-only.
118.1.2 [Link]
[Link]
Description
If true, imported images that have a non-square pixel aspect ratio should be adjusted.
Type
Boolean
671
Illustrator Scripting Guide, Release 0.0.1
118.1.3 [Link]
[Link]
Description
If true, image maps should be preserved when document is converted.
Default: true
Type
Boolean
118.1.4 [Link]
[Link]
Description
If true, layers should be preserved when document is converted.
Default: true
Type
Boolean
118.1.5 [Link]
[Link]
Description
If true, slices should be preserved when document is converted.
Default: true
Type
Boolean
118.1.6 [Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
118.2 Example
NINE
PLACEDITEMS
[Link]
Description
A collection of PlacedItem objects in a document.
119.1 Properties
119.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
119.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
675
Illustrator Scripting Guide, Release 0.0.1
119.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
119.2 Methods
119.2.1 [Link]()
[Link]()
Description
Creates a new object.
Use to place new art in a document. Use the file property of the resulting placedItem object to link the file containing
the artwork. See PlacedItem.
Returns
PlacedItem
119.2.2 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
PlacedItem
119.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
PlacedItem
119.2.4 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
PLUGINITEMS
[Link]
Description
A collection of PluginItem objects in a document.
See Copying a plug-in item.
120.1 Properties
120.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
120.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
679
Illustrator Scripting Guide, Release 0.0.1
120.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
120.2 Methods
120.2.1 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
PluginItem
120.2.2 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
PluginItem
120.2.3 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
ONE
PPDFILE
[Link][index
Description
Associates file information with a PostScript Printer Description (PPD) file.
121.1 Properties
121.1.1 [Link]
[Link][index].name
Description
The PPD model name.
Type
String
121.1.2 [Link]
[Link][index].PPDInfo
Description
The PPD file information.
Type
PPDFileInfo
683
Illustrator Scripting Guide, Release 0.0.1
121.1.3 [Link]
[Link][index].typename
Description
The class name of the object.
Type
String; read-only.
TWO
PPDFILEINFO
[Link][index].PPDInfo
Description
Information about a PostScript Printer Description (PPD) file.
122.1 Properties
122.1.1 [Link]
[Link][index].[Link]
Description
The PostScript language level.
Type
String
122.1.2 [Link]
[Link][index].[Link]
Description
Path specification for the PPD file.
Type
File
685
Illustrator Scripting Guide, Release 0.0.1
122.1.3 [Link]
[Link][index].[Link]
Description
List of color separation screens.
Type
Array of Screen
122.1.4 [Link]
[Link][index].[Link]
Description
List of color separation screen spot functions.
Type
Array of ScreenSpotFunction
122.2 Example
// Displays postscript level and path for each PPD file found in a new text frame
var sPPD = "";
var docRef = [Link]();
var x = 30;
var y = ([Link] - 30);
redraw();
// Displays in a new text frame, the postscript level, file paths, screens, and
// screen spot information for first 10 PPD files found
var x = 30;
var y = ([Link] - 30);
sPPD += "\r\tScreenSpots:\r";
redraw();
y -= ([Link]);
}
THREE
PREFERENCES
[Link]
Description
Specifies the preferred options for AutoCAD, FreeHand, PDF, and Photoshop files.
123.1 Properties
123.1.1 [Link]
[Link]
Description
Options to use when opening or placing an AutoCAD file.
Type
OpenOptionsAutoCAD; read-only.
123.1.2 [Link]
[Link]
Description
Options to use when opening or placing a FreeHand file.
Type
OpenOptionsFreeHand; read-only.
689
Illustrator Scripting Guide, Release 0.0.1
123.1.3 [Link]
[Link]
Description
The parent of this object.
Type
object; read-only.
123.1.4 [Link]
[Link]
Description
Options to use when opening or placing a PDF file.
Type
PDFFileOptions; read-only.
123.1.5 [Link]
[Link]
Description
Options to use when opening or placing a Photoshop file.
Type
PhotoshopFileOptions; read-only.
123.1.6 [Link]
[Link]
Description
The class name of the referenced object.
Type
string; read-only.
123.2 Methods
123.2.1 [Link]
[Link](key)
Description
Gets the boolean value of a given application preference.
Parameters
Returns
Boolean
123.2.2 [Link]
[Link](key)
Description
Gets the integer value of a given application preference.
Parameters
Returns
Integer
123.2.3 [Link]
[Link](key)
Description
Gets the real-number value of a given application preference.
Parameters
Returns
Real
123.2.4 [Link]
[Link](key)
Description
Gets the string value of a given application preference.
Parameters
Returns
String
123.2.5 [Link]
[Link](key)
Description
Deletes a given application preference.
Parameters
Returns
Nothing.
123.2.6 [Link]
[Link](key, value)
Description
Sets the boolean value of a given application preference.
Parameters
Returns
Nothing.
123.2.7 [Link]
[Link](key, value)
Description
Sets the integer value of a given application preference.
Parameters
Returns
Nothing.
123.2.8 [Link]
[Link](key, value)
Description
Sets the real-number value of a given application preference.
Parameters
Returns
Nothing.
123.2.9 [Link]
[Link](key, value)
Description
Sets the string value of a given application preference.
Parameters
Returns
Nothing.
FOUR
PRINTCOLORMANAGEMENTOPTIONS
new PrintColorManagementOptions()
Description
Information used for color management of the document.
124.1 Properties
124.1.1 [Link]
[Link]
Description
The color management profile mode. Default: [Link]
Type
PrintColorProfile
124.1.2 [Link]
[Link]
Description
The color management intent type. Default: [Link]
Type
PrintColorIntent
695
Illustrator Scripting Guide, Release 0.0.1
124.1.3 [Link]
[Link]
Description
The color management profile name.
Type
String
124.1.4 [Link]
[Link]
Description
The class name of the object.
Type
String; read-only.
124.2 Example
symbolItemRef1 = [Link](symbolRef);
[Link] = y;
[Link] = 100;
y -= ([Link] + 10);
}
redraw();
[Link] = [Link];
[Link](options);
[Link] = [Link];
[Link](options);
[Link] = [Link];
[Link](options);
FIVE
PRINTCOLORSEPARATIONOPTIONS
new PrintColorSeparationOptions()
Description
Information about the color separations to be used in printing the document.
125.1 Properties
125.1.1 [Link]
[Link]
Description
The color separation type.
Default: [Link]
Type
PrintColorSeparationMode
125.1.2 [Link]
[Link]
Description
If true, all spot colors should be converted to process colors.
Default: false
Type
Boolean
699
Illustrator Scripting Guide, Release 0.0.1
125.1.3 [Link]
[Link]
Description
The list of inks for color separation.
Type
Array of Ink
125.1.4 [Link]
[Link]
Description
If true, overprint in black.
Default: false
Type
Boolean
125.1.5 [Link]
[Link]
Description
Read-only. The class name of the object.
Type
String
125.2 Example
symbolItemRef1 = [Link](symbolRef);
[Link] = y;
[Link] = 100;
y -= ([Link] + 10);
}
[Link] = true;
[Link] = true;
[Link] = [Link];
[Link](options);
[Link] = [Link];
[Link](options);
[Link] = false;
[Link] = false;
[Link] = [Link];
[Link](options);
SIX
PRINTCOORDINATEOPTIONS
new PrintCoordinateOptions()
Description
Information about the media and associated printing parameters.
126.1 Properties
126.1.1 [Link]
[Link]
Description
If true, flip artwork horizontally.
Default: false
Type
Boolean
126.1.2 [Link]
[Link]
Description
If true, proportionally scale the artwork to fit on media.
Default: false
Type
Boolean
703
Illustrator Scripting Guide, Release 0.0.1
126.1.3 [Link]
[Link]
Description
The horizontal scaling factor expressed as a percentage (100 = 100%).
Range: 1.0 to 10000.0.
Default: 100.0
Type
Number (double)
126.1.4 [Link]
[Link]
Description
The artwork orientation.
Default: [Link]
Type
PrintOrientation
126.1.5 [Link]
[Link]
Description
The artwork position on media.
Default: [Link]
Type
PrintPosition
126.1.6 [Link]
[Link]
Description
The page tiling mode.
Default: [Link]
Type
PrintTiling
126.1.7 [Link]
[Link]
Description
The class name of the object.
Type
String; read-only.
126.1.8 [Link]
[Link]
Description
The vertical scaling factor expressed as a percentage (100 = 100%)
Range: 1.0 to 10000.0.
Default: 100.0
Type
Number (double)
126.2 Example
if ([Link] > 0) {
symbolItemRef1 = [Link](symbolRef);
[Link] = y;
[Link] = x;
x += 30;
}
redraw();
(continues on next page)
[Link] = false;
[Link] = false;
[Link] = [Link];
[Link] = 50;
[Link] = 50;
[Link](options);
}
SEVEN
PRINTER
[Link][index
Description
Associates an available printer with printer information.
To request a list of printers, you must first have a document open or an error is returned.
127.1 Properties
127.1.1 [Link]
[Link][index].name
Description
The printer name.
Type
String
127.1.2 [Link]
[Link][index].printerInfo
Description
The printer information.
Type
PrinterInfo
707
Illustrator Scripting Guide, Release 0.0.1
127.1.3 [Link]
[Link][index].typename
Description
The class name of the object.
Type
String; read-only.
EIGHT
PRINTERINFO
printerInfo
Description
Configuration information about a printer.
128.1 Properties
128.1.1 [Link]
[Link]
Description
If true, the printer supports binary printing.
Type
Boolean
128.1.2 [Link]
[Link]
Description
The printer color capability.
Type
PrinterColorMode
709
Illustrator Scripting Guide, Release 0.0.1
128.1.3 [Link]
[Link]
Description
If true, the printer supports custom paper size.
Type
Boolean
128.1.4 [Link]
[Link]
Description
If true, the printer supports custom paper transverse.
Type
Boolean
128.1.5 [Link]
[Link]
Description
The printer default resolution.
Type
Number (double)
128.1.6 [Link]
[Link]
Description
If true, the printer supports InRIP color separation.
Type
Boolean
128.1.7 [Link]
[Link]
Description
The printer maximum device resolution.
Type
Number (double)
128.1.8 [Link]
[Link]
Description
Custom paper’s maximum height.
Type
Number (double)
128.1.9 [Link]
[Link]
Description
Custom paper’s maximum height offset.
Type
Number (double)
128.1.10 [Link]
[Link]
Description
Custom paper’s maximum width.
Type
Number (double)
128.1.11 [Link]
[Link]
Description
Custom paper’s maximum width offset.
Type
Number (double)
128.1.12 [Link]
[Link]
Description
Custom paper’s minimum height.
Type
Number (double)
128.1.13 [Link]
[Link]
Description
Custom paper’s minimum height offset.
Type
Number (double)
128.1.14 [Link]
[Link]
Description
Custom paper’s minimum width.
Type
Number (double)
128.1.15 [Link]
[Link]
Description
Custom paper’s minimum width offset.
Type
Number (double)
128.1.16 [Link]
[Link]
Description
The list of supported paper sizes.
Type
Array of Paper
128.1.17 [Link]
[Link]
Description
The PostScript Language level.
Type
PrinterPostScriptLevelEnum
128.1.18 [Link]
[Link]
Description
The printer type.
Type
PrinterTypeEnum
128.1.19 [Link]
[Link]
Description
The class name of the object.
Type
String; read-only.
128.2 Example
[Link] = 600;
[Link] = 200;
redraw();
NINE
PRINTFLATTENEROPTIONS
new PrintFlattenerOptions()
Description
Contains flattening options for use when Illustrator outputs artwork that contains transparency into a non-native format.
129.1 Properties
129.1.1 [Link]
[Link]
Description
If true, complex regions should be clipped.
Default: false
Type
Boolean
129.1.2 [Link]
[Link]
Description
If true, convert all strokes to outlines.
Default: false
Type
Boolean
715
Illustrator Scripting Guide, Release 0.0.1
129.1.3 [Link]
[Link]
Description
If true, all text is converted to vector paths; preserves the visual appearance of type.
Default: false
Type
Boolean
129.1.4 [Link]
[Link]
Description
The flattening balance.
Range: 0.0 to 100.0.
Default: 100.0
Type
Number (long)
129.1.5 [Link]
[Link]
Description
The gradient resolution in dots per inch (dpi).
Range: 1.0 to 9600.0.
Default: 300.0
Type
Number (double)
129.1.6 [Link]
[Link]
Description
Whether to preserve, discard, or simulate overprinting.
Default: [Link]
Type
PDFOverprint
129.1.7 [Link]
[Link]
Description
The rasterization resolution in dots per inch (dpi). Range: 1.0 to 9600.0.
Default: 300.0
Type
Number (double)
129.1.8 [Link]
[Link]
Description
The class name of the object.
Type
String; read-only.
129.2 Example
symbolItemRef1 = [Link](symbolRef);
[Link] = y;
[Link] = 100;
y -= ([Link] + 10);
}
redraw();
(continues on next page)
PRINTFONTOPTIONS
new PrintFontOptions()
Description
Contains information about font downloading and substitution for the fonts used for printing the document.
130.1 Properties
130.1.1 [Link]
[Link]
Description
The font download mode.
Default: [Link]
Type
PrintFontDownloadMode
130.1.2 [Link]
[Link]
Description
The font substitution policy.
Default: [Link]
Type
FontSubstitutionPolicy
719
Illustrator Scripting Guide, Release 0.0.1
130.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
130.2 Example
// Creates a new document, adds text then prints with specified font options.
var docRef = [Link]();
// print it
[Link](printOpts);
ONE
PRINTJOBOPTIONS
new PrintJobOptions()
Description
Contains information about how the job is to be printed.
131.1 Properties
131.1.1 [Link]
[Link]
Description
The artboard range to be printed if printAllArtboards is false.
Default: 1-
Type
String
131.1.2 [Link]
[Link]
Description
The bitmap resolution. Minimum: 0.0.
Default: 0.0
Type
Number (double)
721
Illustrator Scripting Guide, Release 0.0.1
131.1.3 [Link]
[Link]
Description
If true, collate print pages.
Default: false
Type
Boolean
131.1.4 [Link]
[Link]
Description
The number of copies to print. Minimum: 1.
Default: 1
Type
Number (long)
131.1.5 [Link]
[Link]
Description
The layers/objects to be printed.
Default: [Link]
Type
PrintArtworkDesignation
131.1.6 [Link]
[Link]
Description
The file to which to print.
Type
File
131.1.7 [Link]
[Link]
Description
The print job name.
Type
String
131.1.8 [Link]
[Link]
Description
Indicates whether to print all artboards.
Default: true
Type
Boolean
131.1.9 [Link]
[Link]
Description
The printing bounds.
Default: [Link]
Type
PrintingBounds
131.1.10 [Link]
[Link]
Description
If true, print as bitmap.
Default: false
Type
Boolean
131.1.11 [Link]
[Link]
Description
If true, print pages in reverse order.
Default: false
Type
Boolean
131.1.12 [Link]
[Link]
Description
Read-only. The class name of the object.
Type
String
131.2 Example
[Link] = [Link];
[Link] = true;
[Link](options);
[Link] = false;
[Link] = [Link];
[Link] = false;
[Link](options);
[Link] = [Link];
var docPath = new File("~/[Link]");
[Link] = docPath;
[Link](options);
TWO
PRINTOPTIONS
new PrintOptions()
Description
Contains information about all printing options including flattening, color management, coordinates, fonts, and paper.
132.1 Properties
132.1.1 [Link]
[Link]
Description
The printing color management options.
Type
PrintColorManagementOptions
132.1.2 [Link]
[Link]
Description
The printing color separation options.
Type
PrintColorSeparationOptions
727
Illustrator Scripting Guide, Release 0.0.1
132.1.3 [Link]
[Link]
Description
The printing coordinate options.
Type
PrintCoordinateOptions
132.1.4 [Link]
[Link]
Description
The printing flattener options.
Type
PrintFlattenerOptions
132.1.5 [Link]
[Link]
Description
The transparency flattener preset name.
Type
String
132.1.6 [Link]
[Link]
Description
The printing font options.
Type
PrintFontOptions
132.1.7 [Link]
[Link]
Description
The printing job options.
Type
PrintJobOptions
132.1.8 [Link]
[Link]
Description
The printing page marks options.
Type
PrintPageMarksOptions
132.1.9 [Link]
[Link]
Description
The paper options.
Type
PrintPaperOptions
132.1.10 [Link]
[Link]
Description
The printing PostScript options.
Type
PrintPostScriptOptions
132.1.11 [Link]
[Link]
Description
The PPD name.
Type
String
132.1.12 [Link]
[Link]
Description
The printer name.
Type
String
132.1.13 [Link]
[Link]
Description
The print style.
Type
String
132.2 Example
[Link] = 100;
y -= ([Link] + 10);
}
redraw();
[Link] = printJobOptions;
[Link] = 60;
[Link] = flatOpts;
THREE
PRINTPAGEMARKSOPTIONS
new PrintPageMarksOptions()
Description
The options for printing page marks.
133.1 Properties
133.1.1 [Link]
[Link]
Description
The bleed offset rectangle.
Type
Array of 4 numbers
133.1.2 [Link]
[Link]
Description
If true, enable printing of color bars.
Default: false
Type
Boolean
733
Illustrator Scripting Guide, Release 0.0.1
133.1.3 [Link]
[Link]
Description
The page marks offset rectangle.
Type
Array of 4 numbers
133.1.4 [Link]
[Link]
Description
If true, page info marks printing is enabled.
Default: false
Type
Boolean
133.1.5 [Link]
[Link]
Description
The page marks style.
Default: [Link]
Type
PageMarksTypes
133.1.6 [Link]
[Link]
Description
If true, registration marks should be printed.
Default: false
Type
Boolean
133.1.7 [Link]
[Link]
Description
If true, trim marks should be printed.
Default: false
Type
Boolean
133.1.8 [Link]
[Link]
Description
Stroke weight of trim marks. Minimum: 0.0.
Default: 0.125
Type
Number (double)
133.1.9 [Link]
[Link]
Description
The class name of the object.
Type
String; read-only.
133.2 Example
[Link] = true;
[Link] = true;
[Link] = true;
[Link] = true;
[Link](options);
FOUR
PRINTPAPEROPTIONS
new PrintPaperOptions()
Description
Information about the paper to be used in the print job.
134.1 Properties
134.1.1 [Link]
[Link]
Description
The custom height (in points) for using the custom paper.
Default: 0.0
Type
Number (double)
134.1.2 [Link]
[Link]
Description
The paper’s name.
Type
String
737
Illustrator Scripting Guide, Release 0.0.1
134.1.3 [Link]
[Link]
Description
Custom offset (in points) for using the custom paper.
Default: 0.0
Type
Number (double)
134.1.4 [Link]
[Link]
Description
If true, transverse the artwork (rotate 90 degrees) on the custom paper.
Default: false
Type
Boolean
134.1.5 [Link]
[Link]
Description
The class name of the object.
Type
String; read-only.
134.1.6 [Link]
[Link]
Description
The custom width (in points) for using the custom paper.
Default: 0.0
Type
Number (double)
134.2 Example
if (printerList[i].[Link] > 0) {
var printerRef = printerList[i];
}
FIVE
PRINTPOSTSCRIPTOPTIONS
new PrintPostScriptOptions()
Description
Options for printing to a PostScript printer.
135.1 Properties
135.1.1 [Link]
[Link]
Description
If true, printing should be in binary mode.
Default: false
Type
Boolean
135.1.2 [Link]
[Link]
Description
If true, use PostScript Level 1-compatible gradient and gradient mesh printing.
Default: false
Type
Boolean
741
Illustrator Scripting Guide, Release 0.0.1
135.1.3 [Link]
[Link]
Description
If true, force continuous tone.
Default: false
Type
Boolean
135.1.4 [Link]
[Link]
Description
The image compression type.
Default: [Link]
Type
PostScriptImageCompressionType
135.1.5 [Link]
[Link]
Description
If true, print in negative mode.
Default: false
Type
Boolean
135.1.6 [Link]
[Link]
Description
The PostScript language level.
Default: PrinterPostScriptLevelEnum.LEVEL2
Type
PrinterPostScriptLevelEnum
135.1.7 [Link]
[Link]
Description
The shading resolution. Range: 1.0 to 9600.0
Default: 300.0
Type
Number (double)
135.1.8 [Link]
[Link]
Description
Read-only. The class name of the object.
Type
String
135.2 Example
[Link] = PrinterPostScriptLevelEnum.PSLEVEL3;
[Link](printOpts);
SIX
RASTEREFFECTOPTIONS
RasterEffectOptions
Description
Specifies raster effects settings for the document. All properties are optional.
136.1 Properties
136.1.1 [Link]
[Link]
Description
If true, the image should be antialiased.
Default: false
Type
Boolean
136.1.2 [Link]
[Link]
Description
If true, a clipping mask is created for the image.
Default: false
Type
Boolean
745
Illustrator Scripting Guide, Release 0.0.1
136.1.3 [Link]
[Link]
Description
The color model for the rasterization.
Default: [Link]
Type
RasterizationColorModel
136.1.4 [Link]
[Link]
Description
If true, all spot colors are converted to process colors for the image.
Default: false
Type
Boolean
136.1.5 [Link]
[Link]
Description
The amount of white space (in points) to be added around the object during rasterization.
Default: .0
Type
Number (double)
136.1.6 [Link]
[Link]
Description
The rasterization resolution in dots per inch (dpi). Range: 72.0 to 2400.0.
Default: 300.0
Type
Number (double)
136.1.7 [Link]
[Link]
Description
If true, the image should use transparency.
Default: false
Type
Boolean
SEVEN
RASTERITEMS
[Link]
Description
A collection of RasterItem objects.
137.1 Properties
137.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
137.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
749
Illustrator Scripting Guide, Release 0.0.1
137.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
137.2 Methods
137.2.1 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
SymbolItem
137.2.2 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
SymbolItem
137.2.3 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
137.3 Example
// Examines the color space of the first raster item in the document and displays
// result in ESTK console
if ([Link] > 0 && [Link] > 0) {
var rasterArt = [Link][0];
switch ([Link]) {
case [Link]:
$.writeln("The color space of the first raster item is CMYK");
break;
case [Link]:
$.writeln("The color space of the first raster item is RGB");
break;
case [Link]:
$.writeln("The color space of the first raster item is GRAYSCALE");
break;
}
}
EIGHT
RASTERIZEOPTIONS
rasterizeOptions
Description
Specifies options that may be supplied when rasterizing artwork.
All properties are optional.
138.1 Properties
138.1.1 [Link]
[Link]
Description
The type of antialiasing method.
Default: [Link]
Type
AntiAliasingMethod
138.1.2 [Link]
[Link]
Description
If true, the rasterization is done against a black background (instead of white).
Default: false
Type
Boolean
753
Illustrator Scripting Guide, Release 0.0.1
138.1.3 [Link]
[Link]
Description
If true, a clipping mask should be created for the image.
Default: false
Type
Boolean
138.1.4 [Link]
[Link]
Description
The color model for the rasterization.
Default: [Link]
Type
RasterizationColorModel
138.1.5 [Link]
[Link]
Description
If true, spot colors should be converted to process colors for the image.
Default: false
Type
Boolean
138.1.6 [Link]
[Link]
Description
If true, all text is converted to outlines before rasterization.
Default: false
Type
Boolean
138.1.7 [Link]
[Link]
Description
If true, the resulting image incorporates layer attributes (like opacity and blend mode).
Default: false
Type
Boolean
138.1.8 [Link]
[Link]
Description
The amount of white space (in points) to be added around the object during rasterization.
Default: .0
Type
Number (double)
138.1.9 [Link]
[Link]
Description
The rasterization resolution in dots per inch (dpi). Range: 72.0 to 2400.0.
Default: 300.0
Type
Number (double)
138.1.10 [Link]
[Link]
Description
If true, the image should use transparency.
Default: false
Type
Boolean
NINE
SCREEN
PPDFileList[index].[Link][index
Description
Associates a color separation screen with information to be used for printing.
139.1 Properties
139.1.1 [Link]
PPDFileList[index].[Link][index].name
Description
The color separation screen name.
Type
String
139.1.2 [Link]
PPDFileList[index].[Link][index].screenInfo
Description
The color separation screen information.
Type
ScreenInfo
757
Illustrator Scripting Guide, Release 0.0.1
139.1.3 [Link]
PPDFileList[index].[Link][index].typename
Description
The class name of the referenced object.
Type
String; read-only.
SCREENINFO
PPDFileList[index].[Link][index].screenInfo
Description
Contains information about the angle and frequency of the color separation screen to be used for printing.
140.1 Properties
140.1.1 [Link]
PPDFileList[index].[Link][index].[Link]
Description
The screen’s angle in degrees.
Type
Number (double).
140.1.2 [Link]
PPDFileList[index].[Link][index].[Link]
Description
If true, it is the default screen.
Type
Boolean.
759
Illustrator Scripting Guide, Release 0.0.1
140.1.3 [Link]
PPDFileList[index].[Link][index].[Link]
Description
The screen’s frequency.
Type
Number (double).
140.1.4 [Link]
PPDFileList[index].[Link][index].[Link]
Description
The class name of the referenced object.
Type
String; read-only.
140.2 Example
redraw();
ONE
SCREENSPOTFUNCTION
PPDFileList[index].[Link][index
Description
Contains information about a color separation screen spot function, including its definition in PostScript language code.
141.1 Properties
141.1.1 [Link]
PPDFileList[index].[Link][index].name
Description
The color separation screen spot function name.
Type
String
141.1.2 [Link]
PPDFileList[index].[Link][index].spotFunction
Description
The spot function expressed in PostScript commands.
Type
String
763
Illustrator Scripting Guide, Release 0.0.1
141.1.3 [Link]
PPDFileList[index].[Link][index].typename
Description
The class name of the referenced object.
Type
String; read-only.
141.2 Example
// Displays in a new text frame, the screen spot functions for the 1st PPD file.
var docRef = [Link]();
var sInfo = "";
if ([Link] == 0) {
sInfo = "\r\t\tEmpty PPDFileList"
} else {
var ppdRef = PPDFileList[0];
var ppdInfoRef = [Link];
sInfo += [Link];
sInfo += ", spotFunction: ";
sInfo += [Link];
sInfo += "\r";
}
} else {
sInfo += "\t\tEmpty ScreenSpotFunctionList";
}
}
redraw();
TWO
SPOT
[Link][index
Description
A custom color definition contained in a SpotColor object.
If no properties are specified when creating a spot, default values are provided.
However, if specifying the color, you must use the same color space as the document, either CMYK or RGB. Otherwise,
an error results.
The new spot is added to the end of the swatches list in the Swatches palette.
142.1 Properties
142.1.1 [Link]
[Link][index].color
Description
The color information for this spot color.
Type
Color
142.1.2 [Link]
[Link][index].colorType
Description
The color model for this custom color.
Type
ColorModel
765
Illustrator Scripting Guide, Release 0.0.1
142.1.3 [Link]
[Link][index].name
Description
The spot color’s name.
Type
String
142.1.4 [Link]
[Link][index].parent
Description
The document that contains this spot color.
Type
Document; read-only.
142.1.5 [Link]
[Link][index].spotKind
Description
The kind of spot color (RGB, CMYK or LAB). This is the name of the color kind contained in the spot object.
Type
SpotColorKind; read-only.
142.1.6 [Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String; read-only.
142.2 Methods
142.2.1 [Link]()
[Link][index].getInternalColor()
Description
Gets the internal color of a spot.
Returns
Color components.
142.2.2 [Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
142.3 Example
// Creates a new spot color in the current document, then applies an 80% tint to the␣
˓→color
if ( [Link] > 0 ) {
var doc = [Link];
THREE
SPOTS
[Link]
Description
A collection of SpotColor objects in a document.
143.1 Properties
143.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
143.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
769
Illustrator Scripting Guide, Release 0.0.1
143.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
143.2 Methods
143.2.1 [Link]()
[Link]()
Description
Creates a new object.
Returns
Spot
143.2.2 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
Spot
143.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Spot
143.2.4 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
143.3 Example
if (spotCount > 0) {
[Link]();
}
}
// Apply a 50% tint of the new spot color to the frontmost path item.
// Create a spotcolor object, set the tint value,
var newSpotColor = new SpotColor();
[Link] = newSpot;
[Link] = 50;
FOUR
STORY
story
Description
A contiguous block of text as specified by a text range. A story can contain one or more text frames; if there is more
than one, the multiple text frames are linked together to form a single story.
144.1 Properties
144.1.1 [Link]
[Link]
Description
All the characters in this story.
Type
Characters; read-only.
144.1.2 [Link]
[Link]
Description
All the insertion points in this story.
Type
InsertionPoints; read-only.
773
Illustrator Scripting Guide, Release 0.0.1
144.1.3 [Link]
[Link]
Description
The number of characters in the story.
Type
Number (long); read-only.
144.1.4 [Link]
[Link]
Description
All the lines in this story.
Type
Lines; read-only.
144.1.5 [Link]
[Link]
Description
All the paragraphs in this story.
Type
Paragraphs; read-only.
144.1.6 [Link]
[Link]
Description
The object’s container.
Type
Object; read-only.
144.1.7 [Link]
[Link]
Description
The text frame items in this story.
Type
TextFrameItems; read-only.
144.1.8 [Link]
[Link]
Description
The text range of the story.
Type
TextRange; read-only.
144.1.9 [Link]
[Link]
Description
All the text ranges in the story.
Type
TextRanges; read-only.
144.1.10 [Link]
[Link]
Description
The selected text ranges in the story.
Type
Array of TextRange; read-only.
144.1.11 [Link]
[Link]
Description
The class name of the object.
Type
String; read-only.
144.1.12 [Link]
[Link]
Description
All the words in the story.
Type
Words; read-only.
144.2 Example
// Creates 1 story that flows through 2 text frames and another story that
// is displayed in a 3rd text frame
// Create a new document and add 2 area TextFrames
var docRef = [Link]();
var itemRef1 = [Link](600, 200, 50, 30);
var textRef1 = [Link](itemRef1);
[Link] = true;
[Link] = true;
redraw();
FIVE
STORIES
stories
Description
A collection of Story objects in a document.
145.1 Properties
145.1.1 [Link]
[Link]
Description
The number of elements in the collection.
Type
Number; read-only.
145.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object; read-only.
779
Illustrator Scripting Guide, Release 0.0.1
145.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
145.2 Methods
145.2.1 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Story
SIX
SWATCH
[Link][index
Description
A color swatch definition contained in a document. The swatches correspond to the swatch palette in the Illustrator
user interface.
A script can create a new swatch.
The swatch can hold all types of color data, such as pattern, gradient, CMYK, RGB, gray, and spot.
146.1 Properties
146.1.1 [Link]
[Link][index].color
Description
The color information for this swatch.
Type
Color
146.1.2 [Link]
[Link][index].name
Description
The swatch’s name.
Type
String.
781
Illustrator Scripting Guide, Release 0.0.1
146.1.3 [Link]
[Link][index].parent
Description
The object that contains this swatch.
Type
Document, read-only.
146.1.4 [Link]
[Link][index].typename
Description
The class name of the object.
Type
String, read-only.
146.2 Methods
146.2.1 [Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
146.3 Example
SEVEN
SWATCHES
[Link]
Description
The collection of Swatch objects in the document.
147.1 Properties
147.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
147.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
783
Illustrator Scripting Guide, Release 0.0.1
147.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
147.2 Methods
147.2.1 [Link]()
[Link]()
Description
Creates a new Swatch object.
Returns
Swatch
147.2.2 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
Swatch
147.2.3 [Link]()
[Link]()
Description
Gets selected swatches in the document.
Returns
List of Swatch
147.2.4 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Swatch
147.2.5 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
147.3 Example
EIGHT
SWATCHGROUP
swatchGroup
Description
A group of Swatch objects.
148.1 Properties
148.1.1 [Link]
[Link]
Description
The name of the swatch group.
Type
string
148.1.2 [Link]
[Link]
Description
The object that contains the swatch group.
Type
Object, read-only.
787
Illustrator Scripting Guide, Release 0.0.1
148.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String, read-only
148.2 Methods
148.2.1 [Link]()
[Link](spot)
Description
Adds a spot swatch to the swatch group.
Parameters
Returns
Nothing.
148.2.2 [Link]()
[Link](swatch)
Description
Adds a swatch to the swatch group.
Parameters
Returns
Nothing.
148.2.3 [Link]()
[Link]()
Description
Gets a list of all swatches in the swatch group.
Returns
List of Swatch
148.2.4 [Link]()
[Link]()
Description
Deletes this object.
Returns
Nothing.
148.2.5 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
NINE
SWATCHGROUPS
swatchGroups
Description
A collection of SwatchGroup objects.
149.1 Properties
149.1.1 [Link]
[Link]
Description
The number of objects in the collection.
Type
Number, read-only.
149.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
791
Illustrator Scripting Guide, Release 0.0.1
149.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
149.2 Methods
149.2.1 [Link]()
[Link]()
Description
Creates a swatch group.
Returns
SwatchGroup
149.2.2 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
SwatchGroup
149.2.3 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
SYMBOLITEMS
[Link]
Description
The collection of SymbolItem objects in the document.
150.1 Properties
150.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
150.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
795
Illustrator Scripting Guide, Release 0.0.1
150.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
150.2 Methods
150.2.1 [Link]()
[Link](symbol)
Description
Creates an instance of the specified symbol.
Parameters
Returns
SymbolItem
150.2.2 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
SymbolItem
150.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
SymbolItem
150.2.4 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
150.3 Example
// are we at bottom?
if ( (y-=60) <= 60 ) {
y = 750; // go back to the top.
(continues on next page)
redraw();
[Link](pathRef);
}
ONE
SYMBOL
[Link][index
Description
An art item that is stored in the Symbols palette, and can be reused one or more times in the document without dupli-
cating the art data. Symbols are contained in documents.
Instances of Symbol in a document are associated with SymbolItem objects, which store the art object properties.
151.1 Properties
151.1.1 [Link]
[Link][index].name
Description
The symbol’s name
Type
String.
151.1.2 [Link]
[Link][index].parent
Description
The object that contains the symbol object.
Type
Object, read-only.
799
Illustrator Scripting Guide, Release 0.0.1
151.1.3 [Link]
[Link][index].typename
Description
The class name of the object.
Type
String, read-only.
151.2 Methods
151.2.1 [Link]()
[Link][index].duplicate()
Description
Creates a duplicate of this object.
Returns
Symbol
151.2.2 [Link]()
[Link][index].remove()
Description
Deletes this object.
Returns
Nothing.
TWO
SYMBOLS
[Link]
Description
The collection of Symbol objects in the document.
152.1 Properties
152.1.1 [Link]
[Link]
Description
Number of elements in the collection.
Type
Number, read-only.
152.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
801
Illustrator Scripting Guide, Release 0.0.1
152.1.3 [Link]
[Link]
Description
The class name of the object.
Type
String, read-only.
152.2 Methods
152.2.1 [Link]()
[Link](sourceArt[, registrationPoint])
Description
Returns a symbol object created from the source art item, any of the following:
• CompoundPathItems
• GroupItems
• MeshItems
• NonNativeItems
• PageItems
• PathItems
• RasterItems
• SymbolItems
• TextFrameItems
The default registration point is [Link].
Parameters
Returns
Symbol
152.2.2 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
Symbol
152.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Symbol
152.2.4 [Link]()
[Link]()
Description
Deletes all elements in the collection.
Returns
Nothing.
152.3 Example
// are we at bottom?
if ( (y-=60) <= 60 ) {
y = 750; // go back to the top.
x+= 200
}
redraw();
[Link](pathRef);
}
THREE
TABSTOPINFO
[Link][index].paragraphs[index].[Link]
Description
Information about the alignment, position, and other details for a tab stop in a ParagraphAttributes object.
153.1 Properties
153.1.1 [Link]
[Link][index].paragraphs[index].[Link].
alignment
Description
The alignment of the tab stop.
Default: Left
Type
TabStopAlignment
153.1.2 [Link]
[Link][index].paragraphs[index].[Link].
decimalCharacter
Description
The character used for decimal tab stops.
Default: .
Type
String
805
Illustrator Scripting Guide, Release 0.0.1
153.1.3 [Link]
[Link][index].paragraphs[index].[Link].
leader
Description
The leader dot character.
Type
String
153.1.4 [Link]
[Link][index].paragraphs[index].[Link].
position
Description
The position of the tab stop expressed in points.
Default: 0.0
Type
Number (double)
153.1.5 [Link]
[Link][index].paragraphs[index].[Link].
typename
Description
The class name of the object.
Type
String, read-only.
153.2 Example
if ( [Link] > 0 ) {
for(var t=0; t<[Link]; t++){
sData += "\t" + tabRef[t].leader + "\t\t";
sData += "\t\t" + tabRef[t].position + "\r";
} // end for
} // end if
} // end for
} // end for
FOUR
TAG
[Link][index].tags[index
Description
A label associated with a specific piece of artwork.
Tags allows you to assign an unlimited number of key-value pairs to any page item in a document.
154.1 Properties
154.1.1 [Link]
[Link][index].tags[index].name
Description
The tag’s name.
Type
String, read-only.
154.1.2 [Link]
[Link][index].tags[index].parent
Description
The object that contains this tag.
Type
Object, read-only.
809
Illustrator Scripting Guide, Release 0.0.1
154.1.3 [Link]
[Link][index].tags[index].typename
Description
The class name of the object.
Type
String, read-only.
154.1.4 [Link]
[Link][index].tags[index].value
Description
The data stored in this tag.
Type
String, read-only.
154.2 Methods
154.2.1 [Link]()
[Link][index].tags[index].remove()
Description
Deletes this object.
Returns
Nothing.
154.3 Example
if ( [Link] > 0 ) {
doc = [Link];
if ( [Link] > 0 ) {
for ( i = 0; i < [Link]; i++ ) {
selectedArt = selection[0];
(continues on next page)
if ([Link] == 0) {
var tempTag = [Link]();
[Link] = "OneWord";
[Link] = "anything you want";
}
FIVE
TAGS
[Link][index].tags
Description
A collection of Tag objects.
155.1 Properties
155.1.1 [Link]
[Link][index].[Link]
Description
The number of elements in the collection.
Type
Number; read-only.
155.1.2 [Link]
[Link][index].[Link]
Description
The object’s container.
Type
Object; read-only.
813
Illustrator Scripting Guide, Release 0.0.1
155.1.3 [Link]
[Link][index].[Link]
Description
The class name of the referenced object.
Type
String; read-only.
155.2 Methods
155.2.1 [Link]()
[Link][index].[Link]()
Description
Creates a new Tag object.
Returns
Tag
155.2.2 [Link]()
[Link][index].[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
Tag
155.2.3 [Link]()
[Link][index].[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Tag
155.2.4 [Link]()
[Link][index].[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
155.3 Example
SIX
TEXTFONT
[Link][index
Description
Information about a font in the document, found in a CharacterAttributes object.
156.1 Properties
156.1.1 [Link]
[Link][index].family
Description
The font’s family name.
Type
String, read-only.
156.1.2 [Link]
[Link][index].name
Description
The font’s full name.
Type
String, read-only.
817
Illustrator Scripting Guide, Release 0.0.1
156.1.3 [Link]
[Link][index].parent
Description
The object’s container.
Type
Object, read-only.
156.1.4 [Link]
[Link][index].style
Description
The font’s style name.
Type
String, read-only.
156.1.5 [Link]
[Link][index].typename
Description
The class name of the object.
Type
String, read-only.
156.2 Example
// Sets the font of all the text in the document to the first font
if ( [Link] > 0 ) {
SEVEN
TEXTFONTS
[Link]
Description
A collection of TextFont objects.
157.1 Properties
157.1.1 [Link]
[Link]
Description
The number of elements in the collection.
Type
Number; read-only.
157.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object; read-only.
819
Illustrator Scripting Guide, Release 0.0.1
157.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
157.2 Methods
157.2.1 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
TextFont
157.2.2 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
TextFont
157.3 Example
// Creates a new A3 sized document and display a list of available fonts until the␣
document is full.
˓→
// check wether the text frame will go off the edge of the document
if ((x + [Link])> [Link]) {
[Link]();
iCount = i;
break;
} else {
// display text frame
[Link] = [Link](textFonts[i].
˓→name);
redraw();
EIGHT
TEXTFRAMEITEMS
[Link]
Description
The collection of TextFrameItem objects in the document.
158.1 Properties
158.1.1 [Link]
[Link]
Description
The number of elements in the collection.
Type
Number; read-only.
158.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object; read-only.
823
Illustrator Scripting Guide, Release 0.0.1
158.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
158.2 Methods
158.2.1 [Link]()
[Link]()
Description
Creates a point text frame item.
Returns
TextFrameItem
158.2.2 [Link]()
Returns
TextFrameItem
158.2.3 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
TextFrameItem
158.2.4 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
TextFrameItem
158.2.5 [Link]()
[Link](textPath[,startTValue][,endTValue][,
orientation][, baseFrame][, postFix])
Description
Creates an on-path text frame item.
Parameters
Returns
TextFrameItem
158.2.6 [Link]()
[Link](anchor[, orientation])
Description
Creates a point text frame item.
Parameters
Returns
TextFrameItem
158.2.7 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
158.3 Example
// Creates a document with text frames displaying path, area and point
// text, changes the content of each frame then deletes the 2nd frame
// Line Text
var lineRef = [Link]();
[Link]( Array(Array(200, 700), Array(300, 550) ) ); var pathTextRef =␣
˓→[Link](lineRef); [Link] = "TextFrame #2";
[Link] = true;
// Point Text
var pointTextRef = [Link](); [Link] = "TextFrame #3";␣
˓→[Link] = 700;
˓→TextFrame."; redraw();
[Link][1].remove(); redraw();
// count again
NINE
TEXTPATH
textPath
Description
A path or list of paths for area or path text. A path consists of path points that define its geometry.
159.1 Properties
159.1.1 [Link]
[Link]
Description
The area of this path in square points. If the area is negative, the path is wound counterclockwise.
Self-intersecting paths can contain sub-areas that cancel each other out, which makes this value zero even though the
path has apparent area.
Type
Number (double), read-only.
159.1.2 [Link]
[Link]
Description
The blend mode used when compositing an object.
Type
BlendModes
829
Illustrator Scripting Guide, Release 0.0.1
159.1.3 [Link]
[Link]
Description
If true, this path should be used as a clipping path.
Type
Boolean
159.1.4 [Link]
[Link]
Description
If true, this path is closed.
Type
Boolean
159.1.5 [Link]
[Link]
Description
Read-only. If true, this item is editable.
Type
Boolean
159.1.6 [Link]
[Link]
Description
If true, the even-odd rule should be used to determine insideness.
Type
Boolean
159.1.7 [Link]
[Link]
Description
The fill color of the path.
Type
Color
159.1.8 [Link]
[Link]
Description
If true, the path be filled.
Type
Boolean
159.1.9 [Link]
[Link]
Description
If true, the art beneath a filled object should be overprinted.
Type
Boolean
159.1.10 [Link]
[Link]
Description
If true, this path is a guide object.
Type
Boolean
159.1.11 [Link]
[Link]
Description
The height of the group item.
Type
Number (double)
159.1.12 [Link]
[Link]
Description
The position of the left side of the item (in points, measured from the left side of the page).
Type
Number (double)
159.1.13 [Link]
[Link]
Description
The note text assigned to the path.
Type
String
159.1.14 [Link]
[Link]
Description
The opacity of the object. Range: 0.0 to 100.0
Type
Number (double)
159.1.15 [Link]
[Link]
Description
Read-only. The parent of this object.
Type
Layer or GroupItem
159.1.16 [Link]
[Link]
Description
Read-only. The path points contained in this path item.
Type
PathPoints
159.1.17 [Link]
[Link]
Description
The polarity of the path.
Type
PolarityValues
159.1.18 [Link]
[Link]
Description
The position (in points) of the top left corner of the textPathItem object in the format [x, y]. Does not include stroke
weight.
Type
Array of 2 numbers
159.1.19 [Link]
[Link]
Description
The resolution of the path in dots per inch (dpi).
Type
Number (double)
159.1.20 [Link]
[Link]
Description
Read-only. All of the selected path points in the path.
Type
PathPoints
159.1.21 [Link]
[Link]
Description
The type of line capping.
Type
StrokeCap
159.1.22 [Link]
[Link]
Description
The stroke color for the path.
Type
Color
159.1.23 [Link]
[Link]
Description
If true, the path should be stroked.
Type
Boolean
159.1.24 [Link]
[Link]
Description
Dash lengths. Set to an empty object, {}, for a solid line.
Type
Object
159.1.25 [Link]
[Link]
Description
The default distance into the dash pattern at which the pattern should be started.
Type
Number (double)
159.1.26 [Link]
[Link]
Description
Type of joints for the path.
Type
StrokeJoin
159.1.27 [Link]
[Link]
Description
When a default stroke join is set to mitered, this property specifies when the join will be converted to beveled (squared-
off) by default. The default miter limit of 4 means that when the length of the point reaches four times the stroke weight,
the join switches from a miter join to a bevel join. A value of 1 specifies a bevel join. Range: 1 to 500. Default: 4
Type
Number (double)
159.1.28 [Link]
[Link]
Description
If true, the art beneath a stroked object should be overprinted.
Type
Boolean
159.1.29 [Link]
[Link]
Description
Width of the stroke.
Type
Number (double)
159.1.30 [Link]
[Link]
Description
The position of the top of the item (in points, measured from the bottom of the page).
Type
Number (double)
159.1.31 [Link]
[Link]
Description
Read-only. The class name of the referenced object.
Type
String
159.1.32 [Link]
[Link]
Description
The width of the item.
Type
Number (double)
159.2 Methods
159.2.1 [Link]()
[Link](pathPoints)
Description
Sets the path using the array of points specified as [x, y] coordinate pairs.
Parameters
Returns
Nothing.
159.3 Example
TEXTRANGE
[Link][index].textRange
Description
A range of text in a specific text art item. TextRange gives you access to the text contained in text art items.
160.1 Properties
160.1.1 [Link]
[Link][index].[Link]
Description
The character properties for the text range.
Type
CharacterAttributes, read-only.
160.1.2 [Link]
[Link][index].[Link]
Description
Offset of the first character.
Type
Number (long)
839
Illustrator Scripting Guide, Release 0.0.1
160.1.3 [Link]
[Link][index].[Link]
Description
All the characters in this text range.
Type
Characters, read-only.
160.1.4 [Link]
[Link][index].[Link]
Description
All referenced character styles in the text range.
Type
CharacterStyles, read-only.
160.1.5 [Link]
[Link][index].[Link]
Description
The text string.
Type
String
160.1.6 [Link]
[Link][index].[Link]
Description
End index of the text range.
Type
Int32
160.1.7 [Link]
[Link][index].[Link]
Description
All the insertion points in this text range.
Type
InsertionPoints, read-only.
160.1.8 [Link]
[Link][index].[Link]
Description
Controls the spacing between two characters, in thousandths of an em. An integer.
Type
Number (long)
160.1.9 [Link]
[Link][index].[Link]
Description
The length (in characters). Minimum: 0
Type
Number (long)
160.1.10 [Link]
[Link][index].[Link]
Description
All the lines in this text range.
Type
Lines, read-only.
160.1.11 [Link]
[Link][index].[Link]
Description
The paragraph properties for the text range.
Type
ParagraphAttributes, read-only.
160.1.12 [Link]
[Link][index].[Link]
Description
All the paragraphs in this text range.
Type
Paragraphs, read-only.
160.1.13 [Link]
[Link][index].[Link]
Description
All referenced paragraph styles in the text range.
Type
ParagraphStyles, read-only.
160.1.14 [Link]
[Link][index].[Link]
Description
The object’s container.
Type
TextRange, read-only.
160.1.15 [Link]
[Link][index].[Link]
Description
Start index of the text range.
Type
Int32
160.1.16 [Link]
[Link][index].[Link]
Description
The story to which the text range belongs.
Type
Story, read-only.
160.1.17 [Link]
[Link][index].[Link]
Description
All of the text in this text range.
Type
TextRanges, read-only.
160.1.18 [Link]
[Link][index].[Link]
Description
The selected text ranges in the text range.
Type
Array of TextRange, read-only.
160.1.19 [Link]
[Link][index].[Link]
Description
The class name of the object.
Type
String, read-only.
160.1.20 [Link]
[Link][index].[Link]
Description
All the words contained in this text range.
Type
Words, read-only.
160.2 Methods
160.2.1 [Link]()
[Link][index].[Link](type)
Description
Changes the capitalization of text
Parameters
Returns
Nothing
160.2.2 [Link]()
[Link][index].[Link]()
Description
Deselects the text range.
Returns
Nothing.
160.2.3 [Link]()
[Link][index].[Link]([relativeObject][,
insertionLocation])
Description
Creates a duplicate of this object.
Parameters
Returns
TextRange
160.2.4 [Link]()
[Link][index].[Link]()
Description
Gets json representation of character overrides.
Returns
String
160.2.5 [Link]()
[Link][index].[Link]()
Description
Gets json representation of paragraph overrides.
Returns
String
160.2.6 [Link]()
[Link][index].[Link]()
Description
Gets the length of the first paragraph of the text range.
Returns
Int32
160.2.7 [Link]()
[Link][index].[Link]()
Description
Gets the length of the first text run of the text range.
Returns
Int32
160.2.8 [Link]()
[Link][index].[Link](relativeObject, insertionLocation)
Description
Moves the object.
Parameters
Returns
TextRange
160.2.9 [Link]()
[Link][index].[Link]()
Description
Deletes the object.
Returns
Nothing
160.2.10 [Link]()
[Link][index].[Link]([addToDocument])
Description
Selects the text range.
Parameters
Returns
Nothing
160.3 Example
if ( [Link] > 0 ) {
for ( i = 0; i < [Link]; i++ ) {
var text = [Link][i].textRange;
for ( j = 0 ; j < [Link]; j++ ) {
//each word is a textRange object
var textWord = [Link][j];
ONE
TEXTRANGES
textRanges
Description
A collection of TextRange objects.
161.1 Properties
161.1.1 [Link]
[Link]
Description
The number of elements in the collection.
Type
Number; read-only.
161.1.2 [Link]
[Link]
Description
The object’s container.
Type
Object; read-only.
849
Illustrator Scripting Guide, Release 0.0.1
161.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
161.2 Methods
161.2.1 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Variable
161.2.2 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
TWO
TRACINGOBJECT
TracingObject
Description
A tracing object, which associates source raster art item with a vector-art plug-in group created by tracing. Scripts can
initiate tracing using [Link] or [Link]().
The resulting PluginItem object represents the vector art group, and has this object in its tracing property.
A script can force the tracing operation by calling [Link](). The operation is asynchronous, so a script
should call redraw after creating the tracing object, but before accessing its properties or expanding the tracing to
convert it to an art item group.
The read-only properties that describe the tracing result have valid values only after the first tracing operation completes.
A value of 0 indicates that the operation has not yet been completed.
162.1 Properties
162.1.1 [Link]
[Link]
Description
The number of anchors in the tracing result.
Type
Number (long); read-only.
162.1.2 [Link]
[Link]
Description
The number of areas in the tracing result.
Type
Number (long); read-only.
851
Illustrator Scripting Guide, Release 0.0.1
162.1.3 [Link]
[Link]
Description
The resolution of the source image in pixels per inch.
Type
Number (real); read-only.
162.1.4 [Link]
[Link]
Description
The object’s container.
Type
Object; read-only.
162.1.5 [Link]
[Link]
Description
The number of paths in the tracing result.
Type
Number (long); read-only.
162.1.6 [Link]
[Link]
Description
The raster art used to create the associated vector art plug-in group.
Type
PlacedItem or RasterItem
162.1.7 [Link]
[Link]
Description
The options used to convert the raster artwork to vector art.
Type
TracingOptions
162.1.8 [Link]
[Link]
Description
The class name of the object.
Type
String; read-only.
162.1.9 [Link]
[Link]
Description
The number of colors used in the tracing result.
Type
Number (long); read-only.
162.2 Methods
162.2.1 [Link]()
[Link]([viewed])
Description
Converts the vector art into a new group item. The new GroupItem object replaces the PluginItem object in the docu-
ment.
By default, viewed is false, and the new group contains only the tracing result (the filled or stroked paths).
If viewed is true, the new group retains additional information that was specified for the viewing mode, such as
outlines and overlays.
Deletes this object and its associated PluginItem object. Any group-level attributes that were applied to the plug-in
item are applied to the top level of the new group item.
Parameters
Returns
GroupItem
162.2.2 [Link]()
[Link]()
Description
Reverts the artwork in the document to the original source raster art and removes the traced vector art. Returns the
original object used to create the tracing, and deletes this object and its associated PluginItem object.
Parameters
Returns
PlacedItem or RasterItem
THREE
TRACINGOPTIONS
[Link]
Description
A set of options used in converting raster art to vector art by tracing.
163.1 Properties
163.1.1 [Link]
[Link]
Description
The sharpness, in degrees of a turn in the original image that is considered a corner in the tracing result path.
Range: 0 to 180
Type
Number (double)
163.1.2 [Link]
[Link]
Description
If true, trace with fills. At least one of fills or strokes must be true.
Type
Boolean
855
Illustrator Scripting Guide, Release 0.0.1
163.1.3 [Link]
[Link]
Description
If true, ignores white fill color.
Type
Boolean
163.1.4 [Link]
[Link]
Description
If true, result is LivePaint art. If false, it is classic art.
Note: A script should only set this value in preparation for a subsequent expand operation. Leaving a tracing on the
artboard when this property is true can lead to unexpected application behavior.
Type
Boolean
163.1.5 [Link]
[Link]
Description
The maximum number of colors allowed for automatic palette generation.
Used only if tracingMode is [Link] or [Link].
Range: 2 to 256
Type
Number (long)
163.1.6 [Link]
[Link]
Description
The maximum stroke weight, when strokes is true.
Range: 0.01 to 100.0
Type
Number (double)
163.1.7 [Link]
[Link]
Description
The smallest feature, in square pixels, that is traced.
For example, if it is 4, a feature of 2 pixels wide by 2 pixels high is traced.
Type
Number (long)
163.1.8 [Link]
[Link]
Description
The minimum length in pixels of features in the original image that can be stroked, when strokes is true.
Smaller features are omitted. Range: 0.0 to 200.0. Default: 20.0
Type
Number (double)
163.1.9 [Link]
[Link]
Description
If true, named colors (swatches) are generated for each new color created by the tracing result.
Used only if tracingMode is [Link] or [Link].
Type
Boolean
163.1.10 [Link]
[Link]
Description
The name of a color palette to use for tracing. If the empty string, use the automatic palette.
Used only if tracingMode is [Link] or [Link].
Type
String
163.1.11 [Link]
[Link]
Description
The object’s container.
Type
Object, read-only.
163.1.12 [Link]
[Link]
Description
The distance between the traced shape and the original pixel shape. Lower values create a tighter path fitting.
Higher values create a looser path fitting. Range: 0.0 to 10.0
Type
Number (double)
163.1.13 [Link]
[Link]
Description
The amount of blur used during preprocessing, in pixels. Blurring helps reduce small artifacts and smooth jagged edges
in the tracing result. Range: 0.0 to 2.0
Type
Number (double)
163.1.14 [Link]
[Link]
Description
The name of a preset file containing these options.
Type
String, read-only.
163.1.15 [Link]
[Link]
Description
If true, resample when tracing. (This setting is not captured in a preset file.)
Always true when the raster source art is placed or linked.
Type
Boolean
163.1.16 [Link]
[Link]
Description
The resolution to use when resampling in pixels per inch (ppi).
Lower resolution increases the speed of the tracing operation. (This setting is not captured in a preset file.)
Type
Number (double)
163.1.17 [Link]
[Link]
Description
If true, trace with strokes. At least one of fills or strokes must be true.
Used only if tracingMode is [Link].
Type
Boolean
163.1.18 [Link]
[Link]
Description
The threshold value of black-and-white tracing. All pixels with a grayscale value greater than this are converted to
black.
Used only if tracingMode is [Link].
Range: 0 to 255
Type
Number (long)
163.1.19 [Link]
[Link]
Description
The color mode for tracing.
Type
TracingModeType
163.1.20 [Link]
[Link]
Description
Read-only. The class name of the object.
Type
String
163.1.21 [Link]
[Link]
Description
The view for previews of the raster image. (This setting is not captured in a preset file.)
Type
ViewRasterType
163.1.22 [Link]
[Link]
Description
The view for previews of the vector result. (This setting is not captured in a preset file.)
Type
ViewVectorType
163.2 Methods
163.2.1 [Link]()
[Link](parameter)
Description
Loads a set of options from the specified preset, as found in the [Link] array.
Parameters
Returns
Boolean
163.2.2 [Link]()
[Link](parameter)
Description
Saves this set of options in the specified preset.
Use a name found in the [Link] array, or a new name to create a new preset.
For an existing preset, overwrites an unlocked preset and returns true.
Returns false if the preset is locked.
Parameters
Returns
Boolean
FOUR
VARIABLE
[Link][index
Description
A document-level variable that can be imported or exported.
A variable is a dynamic object used to create data-driven graphics.
For an example, see Dataset.
Variables are accessed in Illustrator through the Variables palette.
164.1 Properties
164.1.1 [Link]
[Link][index].kind
Description
The variable’s type.
Type
VariableKind
164.1.2 [Link]
[Link][index].name
Description
The name of the variable.
Type
string
863
Illustrator Scripting Guide, Release 0.0.1
164.1.3 [Link]
[Link][index].pageItems
Description
All of the artwork in the variable.
Type
PageItems, read-only
164.1.4 [Link]
[Link][index].parent
Description
Read-only. The object that contains the variable.
Type
Object
164.1.5 [Link]
[Link][index].typename
Description
The class name of the referenced object.
Type
String, read-only
164.2 Methods
164.2.1 [Link]()
[Link][index].remove()
Description
Removes the variable from the collection of variables.
Returns
Nothing.
FIVE
VARIABLES
[Link]
Description
The collection of Variable objects in the document.
For an example of how to create variables, see Using variables and datasets.
165.1 Properties
165.1.1 [Link]
[Link]
Description
The number of variables in the document
Type
Number; read-only.
165.1.2 [Link]
[Link]
Description
The object that contains the collection of variables
Type
Object; read-only.
865
Illustrator Scripting Guide, Release 0.0.1
165.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
165.2 Methods
165.2.1 [Link]()
[Link]()
Description
Adds a new variable to the collection.
Returns
Variable
165.2.2 [Link]()
[Link](name)
Description
Get the first element in the collection with the provided name.
Parameters
Returns
Variable
165.2.3 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
Variable
165.2.4 [Link]()
[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
SIX
VIEW
[Link][index
Description
A document view in an Illustrator document, which represents a window view onto a document.
Scripts cannot create new views, but can modify some properties of existing views, including the center point, screen
mode, and zoom.
166.1 Properties
166.1.1 [Link]
[Link][index].bounds
Description
Read-only. The bounding rectangle of this view relative to the current document’s bounds.
Type
Array of 4 Numbers
166.1.2 [Link]
[Link][index].centerPoint
Description
The center point of this view relative to the current document’s bounds.
Type
Array of 2 Numbers
869
Illustrator Scripting Guide, Release 0.0.1
166.1.3 [Link]
[Link][index].parent
Description
Read-only. The document that contains this view.
Type
Document
166.1.4 [Link]
[Link][index].screenMode
Description
The mode of display for this view.
Type
ScreenMode
166.1.5 [Link]
[Link][index].typename
Description
Read-only. The class name of the referenced object.
Type
String
166.1.6 [Link]
[Link][index].zoom
Description
The zoom factor of this view, where 100.0 is 100%.
Type
Number (double)
SEVEN
VIEWS
[Link]
Description
A collection of View objects in a document.
167.1 Properties
167.1.1 [Link]
[Link]
Description
The number of objects in the collection
Type
Number; read-only.
167.1.2 [Link]
[Link]
Description
The parent of this object.
Type
Object; read-only.
871
Illustrator Scripting Guide, Release 0.0.1
167.1.3 [Link]
[Link]
Description
The class name of the referenced object.
Type
String; read-only.
167.2 Methods
167.2.1 [Link]()
[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
View
EIGHT
WORDS
[Link][index].words
Description
A collection of words in a text item, where each word is a TextRange object.
The elements are not named; you must access them by index.
168.1 Properties
168.1.1 [Link]
[Link][index].[Link]
Description
The number of objects in the collection
Type
Number; read-only.
168.1.2 [Link]
[Link][index].[Link]
Description
The parent of this object.
Type
Object; read-only.
873
Illustrator Scripting Guide, Release 0.0.1
168.1.3 [Link]
[Link][index].[Link]
Description
The class name of the referenced object.
Type
String; read-only.
168.2 Methods
168.2.1 [Link]()
[Link][index].[Link](contents[, relativeObject][,
inseertLocation])
Description
Adds a word to the current document at the specified location.
If no location is specified, adds it to the containing text frame after the current word selection or insertion point.
Parameters
Returns
TextRange
168.2.2 [Link]()
[Link][index].[Link](contents)
Description
Adds a word before the current word selection or insertion point.
Parameters
Returns
TextRange
168.2.3 [Link]()
[Link][index].[Link](itemKey)
Description
Gets an element from the collection.
Parameters
Returns
TextRange
168.2.4 [Link]()
[Link][index].[Link]()
Description
Deletes all elements in this collection.
Returns
Nothing.
168.3 Example
// Creates a new magenta color and applies the color to all words meeting a specific␣
˓→criteria