2
cs
®
Illustrator
®
JavaScript Reference
Adobe
bbc
© 2005 Adobe Systems Incorporated. All rights reserved.
Æ
Adobe
Illustrator® CS2 JavaScript Reference for Windows® and Mac OS®.
NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication (whether in hardcopy or
electronic form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or
otherwise, without the prior written consent of Adobe Systems Incorporated. The software described in this document is furnished under
license and may only be used or copied in accordance with the terms of such license.
This publication and the information herein is furnished AS IS, is subject to change without notice, and should not be construed as a
commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or
inaccuracies, makes no warranty of any kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and
all warranties of merchantability, fitness for particular purposes, and noninfringement of third party rights.
Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual
organization.
Adobe, the Adobe logo, Acrobat, and Illustrator are either registered trademarks or trademarks of Adobe Systems Incorporated in the United
States and/or other countries.
Apple, Mac, Macintosh, and Mac OS are trademarks of Apple Computer, Inc., registered in the United States and other countries. Microsoft,
and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries. JavaScript
and all Java-related marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. UNIX is
a registered trademark of The Open Group.
All other trademarks are the property of their respective owners.
If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is furnished
under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part
of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording,
or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected
under copyright law even if it is not distributed with software that includes an end user license agreement.
The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a
commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or
inaccuracies that may appear in the informational content contained in this guide.
Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA.
Contents
1 Introduction ...............................................................................................................................47
What is scripting? .........................................................................................................................................................................47
Why use scripting?.................................................................................................................................................................48
What about actions? .............................................................................................................................................................48
Script Support in Adobe Illustrator CS2 ...............................................................................................................................49
JavaScript support .................................................................................................................................................................49
Executing scripts ....................................................................................................................................................................49
Installing scripts ...............................................................................................................................................................49
Executing other scripts..................................................................................................................................................50
Startup scripts .........................................................................................................................................................................50
Changes Since Earlier Versions................................................................................................................................................50
2 Scripting Basics.......................................................................................................................... 52
Object model concepts..............................................................................................................................................................52
Object classes and containers ...........................................................................................................................................53
Object inheritance .................................................................................................................................................................53
Object elements or collections .........................................................................................................................................53
Object references...................................................................................................................................................................53
Scripting concepts .......................................................................................................................................................................54
Comments ................................................................................................................................................................................54
Long script lines......................................................................................................................................................................54
Case sensitivity........................................................................................................................................................................54
Value types ...............................................................................................................................................................................54
Variables ....................................................................................................................................................................................55
Declaring variables and assigning values ...............................................................................................................55
Variable naming ...............................................................................................................................................................56
Operators ..................................................................................................................................................................................56
Functions...................................................................................................................................................................................57
Conditional statements .......................................................................................................................................................57
Control structures ..................................................................................................................................................................57
Including Other Script Files ................................................................................................................................................58
Testing and troubleshooting ...................................................................................................................................................58
About error handling............................................................................................................................................................59
JavaScript Resources...................................................................................................................................................................59
3 Scripting Illustrator ................................................................................................................... 60
The Illustrator object model .....................................................................................................................................................60
Referencing and Creating Objects in JavaScript.........................................................................................................61
Working with the Selection Object .................................................................................................................................62
Working with paths ...............................................................................................................................................................62
Working with color ................................................................................................................................................................63
Working with symbols and symbol items.....................................................................................................................63
Working with Methods...............................................................................................................................................................63
Working with Text and Printing ..............................................................................................................................................64
Content of a Text Range......................................................................................................................................................65
Character Style, Character Attributes, Local Character Attributes .......................................................................65
3
Adobe Illustrator CS2
JavaScript Scripting Reference 4
Printing Illustrator Documents..........................................................................................................................................65
Measurement units......................................................................................................................................................................66
Em Space Units .......................................................................................................................................................................67
Page item positioning and dimensions .........................................................................................................................67
4 Using File and Folder Objects ................................................................................................... 69
Overview .........................................................................................................................................................................................69
Specifying Paths............................................................................................................................................................................69
Absolute and relative path names...................................................................................................................................69
Character interpretation in paths.....................................................................................................................................70
The home directory...............................................................................................................................................................70
Volume and drive names ....................................................................................................................................................71
Mac OS volumes...............................................................................................................................................................71
Windows drives ................................................................................................................................................................71
Aliases.........................................................................................................................................................................................72
Portability issues.....................................................................................................................................................................72
Unicode I/O ....................................................................................................................................................................................72
File Error Handling ......................................................................................................................................................................73
5 JavaScript Object Reference ..................................................................................................... 74
Application .....................................................................................................................................................................................75
Application properties .........................................................................................................................................................75
activeDocument.....................................................................................................................................................................75
browserAvailable ...................................................................................................................................................................75
documents ...............................................................................................................................................................................75
flattenerPresetsList................................................................................................................................................................75
freeMemory..............................................................................................................................................................................75
name...........................................................................................................................................................................................75
path.............................................................................................................................................................................................75
PDFPresetsList.........................................................................................................................................................................75
PPDFileList ................................................................................................................................................................................75
preferences...............................................................................................................................................................................75
printerList..................................................................................................................................................................................75
printPresetsList .......................................................................................................................................................................75
scriptingVersion......................................................................................................................................................................75
selection ....................................................................................................................................................................................75
textFonts ...................................................................................................................................................................................75
tracingPresetList.....................................................................................................................................................................75
typename..................................................................................................................................................................................75
userInteractionLevel .............................................................................................................................................................75
version........................................................................................................................................................................................76
visible..........................................................................................................................................................................................76
Application methods ............................................................................................................................................................76
beep............................................................................................................................................................................................76
concatenateMatrix.................................................................................................................................................................76
concatenateRotationMatrix ...............................................................................................................................................76
concatenateScaleMatrix ......................................................................................................................................................76
concatenateTranslationMatrix ..........................................................................................................................................76
getIdentityMatrix ...................................................................................................................................................................76
getRotationMatrix..................................................................................................................................................................76
getScaleMatrix ........................................................................................................................................................................76
getTranslationMatrix ............................................................................................................................................................76
Adobe Illustrator CS2
JavaScript Scripting Reference 5
invertMatrix..............................................................................................................................................................................76
isEqualMatrix ...........................................................................................................................................................................76
isSingularMatrix......................................................................................................................................................................76
open............................................................................................................................................................................................77
quit ..............................................................................................................................................................................................77
redraw ........................................................................................................................................................................................77
showPresets .............................................................................................................................................................................77
translatePlaceholderText ....................................................................................................................................................77
Brush .................................................................................................................................................................................................79
Brush properties .....................................................................................................................................................................79
name...........................................................................................................................................................................................79
parent.........................................................................................................................................................................................79
typename..................................................................................................................................................................................79
Brush methods........................................................................................................................................................................79
applyTo ......................................................................................................................................................................................79
Brushes.............................................................................................................................................................................................80
Brushes properties.................................................................................................................................................................80
length .........................................................................................................................................................................................80
parent.........................................................................................................................................................................................80
typename..................................................................................................................................................................................80
Brushes methods....................................................................................................................................................................80
getByName...............................................................................................................................................................................80
index ...........................................................................................................................................................................................80
CharacterAttributes.....................................................................................................................................................................81
CharacterAttributes properties.........................................................................................................................................81
akiLeft.........................................................................................................................................................................................81
akiRight......................................................................................................................................................................................81
alignment..................................................................................................................................................................................81
alternateGlyphs ......................................................................................................................................................................81
autoLeading.............................................................................................................................................................................81
baselineDirection...................................................................................................................................................................81
baselinePosition .....................................................................................................................................................................81
baselineShift ............................................................................................................................................................................81
capitalization ...........................................................................................................................................................................81
connectionForms...................................................................................................................................................................81
contextualLigature ................................................................................................................................................................81
discretionaryLigature ...........................................................................................................................................................81
figureStyle.................................................................................................................................................................................81
fillColor.......................................................................................................................................................................................81
fractions.....................................................................................................................................................................................82
horizontalScale .......................................................................................................................................................................82
italics...........................................................................................................................................................................................82
kerningMethod.......................................................................................................................................................................82
language ...................................................................................................................................................................................82
leading .......................................................................................................................................................................................82
ligature.......................................................................................................................................................................................82
noBreak......................................................................................................................................................................................82
openTypePosition..................................................................................................................................................................82
ordinals ......................................................................................................................................................................................82
ornaments ................................................................................................................................................................................82
overprintFill..................................................................................................................
............................................................82
Adobe Illustrator CS2
JavaScript Scripting Reference 6
overprintStroke.......................................................................................................................................................................82
parent.........................................................................................................................................................................................82
proportionalMetrics ..............................................................................................................................................................82
rotation ......................................................................................................................................................................................82
size...............................................................................................................................................................................................82
strikeThrough ..........................................................................................................................................................................82
strokeColor ...............................................................................................................................................................................82
strokeWeight ...........................................................................................................................................................................82
stylisticAlternates...................................................................................................................................................................82
swash..........................................................................................................................................................................................83
tateChuYokoHorizontal .......................................................................................................................................................83
tateChuYokoVertical .............................................................................................................................................................83
textFont .....................................................................................................................................................................................83
titling ..........................................................................................................................................................................................83
tracking......................................................................................................................................................................................83
Tsume.........................................................................................................................................................................................83
typename..................................................................................................................................................................................83
underline...................................................................................................................................................................................83
verticalScale .............................................................................................................................................................................83
wariChuCharactersAfterBreak ...........................................................................................................................................83
wariChuCharactersBeforeBreak........................................................................................................................................83
wariChuEnabled .....................................................................................................................................................................83
wariChuJustification .............................................................................................................................................................83
wariChuLineGap.....................................................................................................................................................................83
wariChuLines ...........................................................................................................................................................................83
wariChuScale ...........................................................................................................................................................................83
Characters .......................................................................................................................................................................................85
Characters properties ...........................................................................................................................................................85
length .........................................................................................................................................................................................85
parent.........................................................................................................................................................................................85
typename..................................................................................................................................................................................85
Characters methods..............................................................................................................................................................85
add...............................................................................................................................................................................................85
addBefore .................................................................................................................................................................................85
index ...........................................................................................................................................................................................85
removeAll..................................................................................................................................................................................85
CharacterStyle ...............................................................................................................................................................................86
CharacterStyle properties ...................................................................................................................................................86
characterAttributes ...............................................................................................................................................................86
name...........................................................................................................................................................................................86
parent.........................................................................................................................................................................................86
typename..................................................................................................................................................................................86
CharacterStyle methods ......................................................................................................................................................86
applyTo ......................................................................................................................................................................................86
remove.......................................................................................................................................................................................86
CharacterStyles .............................................................................................................................................................................87
CharacterStyles properties .................................................................................................................................................87
length .........................................................................................................................................................................................87
parent.........................................................................................................................................................................................87
typename..................................................................................................................................................................................87
CharacterStyles methods ........................................................................................................
............................................87
Adobe Illustrator CS2
JavaScript Scripting Reference 7
add...............................................................................................................................................................................................87
getByName...............................................................................................................................................................................87
index ...........................................................................................................................................................................................87
removeAll..................................................................................................................................................................................87
CMYKColor......................................................................................................................................................................................89
CMYKColor properties..........................................................................................................................................................89
black............................................................................................................................................................................................89
cyan.............................................................................................................................................................................................89
magenta ....................................................................................................................................................................................89
typename..................................................................................................................................................................................89
yellow .........................................................................................................................................................................................89
CompoundPathItem ...................................................................................................................................................................90
CompoundPathItem properties .......................................................................................................................................90
artworkKnockout ...................................................................................................................................................................90
blendingMode ........................................................................................................................................................................90
controlBounds.........................................................................................................................................................................90
editable......................................................................................................................................................................................90
geometricBounds ..................................................................................................................................................................90
height .........................................................................................................................................................................................90
hidden........................................................................................................................................................................................90
isIsolated ...................................................................................................................................................................................90
layer.............................................................................................................................................................................................90
left................................................................................................................................................................................................90
locked.........................................................................................................................................................................................90
name...........................................................................................................................................................................................90
opacity .......................................................................................................................................................................................90
parent.........................................................................................................................................................................................90
pathItems..................................................................................................................................................................................90
position......................................................................................................................................................................................90
selected......................................................................................................................................................................................91
sliced...........................................................................................................................................................................................91
tags..............................................................................................................................................................................................91
top ...............................................................................................................................................................................................91
typename..................................................................................................................................................................................91
uRL...............................................................................................................................................................................................91
visibilityVariable .....................................................................................................................................................................91
visibleBounds ..........................................................................................................................................................................91
width...........................................................................................................................................................................................91
wrapInside ................................................................................................................................................................................91
wrapOffset................................................................................................................................................................................91
wrapped ....................................................................................................................................................................................91
zOrderPosition ........................................................................................................................................................................91
CompoundPathItem methods ..........................................................................................................................................91
duplicate ...................................................................................................................................................................................91
move...........................................................................................................................................................................................91
remove.......................................................................................................................................................................................91
resize...........................................................................................................................................................................................92
rotate ..........................................................................................................................................................................................92
transform...................................................................................................................................................................................92
translate.....................................................................................................................................................................................92
zOrder.........................................................................................................................
................................................................92
Adobe Illustrator CS2
JavaScript Scripting Reference 8
CompoundPathItems .................................................................................................................................................................94
CompoundPathItem methods ..........................................................................................................................................94
length .........................................................................................................................................................................................94
parent.........................................................................................................................................................................................94
typename..................................................................................................................................................................................94
CompoundPathItem methods ..........................................................................................................................................94
add...............................................................................................................................................................................................94
getByName...............................................................................................................................................................................94
index ...........................................................................................................................................................................................94
removeAll..................................................................................................................................................................................94
Dataset .............................................................................................................................................................................................95
Dataset properties .................................................................................................................................................................95
name...........................................................................................................................................................................................95
parent.........................................................................................................................................................................................95
typename..................................................................................................................................................................................95
Dataset methods....................................................................................................................................................................95
display ........................................................................................................................................................................................95
remove.......................................................................................................................................................................................95
update........................................................................................................................................................................................95
Datasets ...........................................................................................................................................................................................97
Datasets properties ...............................................................................................................................................................97
length .........................................................................................................................................................................................97
parent.........................................................................................................................................................................................97
typename..................................................................................................................................................................................97
Datasets methods ..................................................................................................................................................................97
add...............................................................................................................................................................................................97
getByName...............................................................................................................................................................................97
index ...........................................................................................................................................................................................97
removeAll..................................................................................................................................................................................97
Document .......................................................................................................................................................................................98
Document properties ...........................................................................................................................................................98
activeDataset...........................................................................................................................................................................98
activeLayer ...............................................................................................................................................................................98
activeView.................................................................................................................................................................................98
brushes ......................................................................................................................................................................................98
characterStyles........................................................................................................................................................................98
compoundPathItems............................................................................................................................................................98
cropBox......................................................................................................................................................................................98
cropStyle ...................................................................................................................................................................................98
dataSets .....................................................................................................................................................................................98
defaultFillColor .......................................................................................................................................................................98
defaultFilled .............................................................................................................................................................................98
defaultFillOverprint...............................................................................................................................................................98
defaultStrokeCap ...................................................................................................................................................................98
defaultStrokeColor ................................................................................................................................................................98
defaultStroked ........................................................................................................................................................................98
defaultStrokeDashes.............................................................................................................................................................99
defaultStrokeDashOffset.....................................................................................................................................................99
defaultStrokeJoin...................................................................................................................................................................99
defaultStrokeMiterLimit ......................................................................................................................................................99
defaultStrokeOverprint.........................................................................................................
...............................................99
Adobe Illustrator CS2
JavaScript Scripting Reference 9
defaultStrokeWidth...............................................................................................................................................................99
documentColorSpace...........................................................................................................................................................99
fullName....................................................................................................................................................................................99
geometricBounds ..................................................................................................................................................................99
gradients ...................................................................................................................................................................................99
graphicStyles ...........................................................................................................................................................................99
graphItems ...............................................................................................................................................................................99
groupItems...............................................................................................................................................................................99
height .........................................................................................................................................................................................99
inkList .........................................................................................................................................................................................99
kinsokuSet ................................................................................................................................................................................99
layers........................................................................................................................................................................................ 100
legacyTextItems................................................................................................................................................................... 100
meshItems ............................................................................................................................................................................. 100
mojikumiSet.......................................................................................................................................................................... 100
name........................................................................................................................................................................................ 100
outputResolution ................................................................................................................................................................ 100
pageItems.............................................................................................................................................................................. 100
pageOrigin............................................................................................................................................................................. 100
paragraphStyles................................................................................................................................................................... 100
parent...................................................................................................................................................................................... 100
path.......................................................................................................................................................................................... 100
pathItems............................................................................................................................................................................... 100
patterns .................................................................................................................................................................................. 100
placedItems........................................................................................................................................................................... 100
pluginItems ........................................................................................................................................................................... 100
printTiles................................................................................................................................................................................. 100
rasterItems............................................................................................................................................................................. 100
rulerOrigin ............................................................................................................................................................................. 100
rulerUnits................................................................................................................................................................................ 101
saved........................................................................................................................................................................................ 101
selection ................................................................................................................................................................................. 101
showPlacedImages............................................................................................................................................................. 101
splitLongPaths ..................................................................................................................................................................... 101
spots......................................................................................................................................................................................... 101
stationery ............................................................................................................................................................................... 101
stories ...................................................................................................................................................................................... 101
swatches................................................................................................................................................................................. 101
symbolItems ......................................................................................................................................................................... 101
symbols................................................................................................................................................................................... 101
tags........................................................................................................................................................................................... 101
textFrames............................................................................................................................................................................. 101
tileFullPages.......................................................................................................................................................................... 101
typename............................................................................................................................................................................... 101
useDefaultScreen................................................................................................................................................................ 101
variables ................................................................................................................................................................................. 101
variablesLocked................................................................................................................................................................... 102
views........................................................................................................................................................................................ 102
visibleBounds ....................................................................................................................................................................... 102
width........................................................................................................................................................................................ 102
Document methods...............................................................................................................
............................................ 102
Adobe Illustrator CS2
JavaScript Scripting Reference 10
activate ................................................................................................................................................................................... 102
close......................................................................................................................................................................................... 102
exportFile ............................................................................................................................................................................... 102
exportPDFPreset ................................................................................................................................................................. 102
exportPrintPreset ................................................................................................................................................................ 102
exportVariables.................................................................................................................................................................... 102
importCharacterStyles ...................................................................................................................................................... 102
importParagraphStyles ..................................................................................................................................................... 102
importPDFPreset................................................................................................................................................................. 103
importPrintPreset................................................................................................................................................................ 103
importVariables ................................................................................................................................................................... 103
print.......................................................................................................................................................................................... 103
save .......................................................................................................................................................................................... 103
saveAs ..................................................................................................................................................................................... 103
Documents .................................................................................................................................................................................. 104
Documents properties ...................................................................................................................................................... 104
length ...................................................................................................................................................................................... 104
parent...................................................................................................................................................................................... 104
typename............................................................................................................................................................................... 104
Documents methods......................................................................................................................................................... 104
add............................................................................................................................................................................................ 104
getByName............................................................................................................................................................................ 104
index ........................................................................................................................................................................................ 104
EPSSaveOptions......................................................................................................................................................................... 105
EPSSaveOptions properties............................................................................................................................................. 105
cmykPostScript .................................................................................................................................................................... 105
compatibility......................................................................................................................................................................... 105
compatibleGradientPrinting........................................................................................................................................... 105
embedAllFonts..................................................................................................................................................................... 105
embedLinkedFiles............................................................................................................................................................... 105
flattenOuput ......................................................................................................................................................................... 105
includeDocumentThumbnails ....................................................................................................................................... 105
overprint................................................................................................................................................................................. 105
postScript............................................................................................................................................................................... 105
preview ................................................................................................................................................................................... 105
typename............................................................................................................................................................................... 105
ExportOptionsFlash .................................................................................................................................................................. 107
ExportOptionsFlash properties...................................................................................................................................... 107
artBoardClipping................................................................................................................................................................. 107
backgroundColor................................................................................................................................................................ 107
backgroundLayers .............................................................................................................................................................. 107
blendAnimation .................................................................................................................................................................. 107
compressed........................................................................................................................................................................... 107
convertTextToOutlines ..................................................................................................................................................... 107
curveQuality.......................................................................................................................................................................... 107
exportStyle ............................................................................................................................................................................ 107
flattenOutput........................................................................................................................................................................ 107
frameRate............................................................................................................................................................................... 107
generateHTML ..................................................................................................................................................................... 107
imageFormat ........................................................................................................................................................................ 107
jpegMethod .....................................................................................................................
..................................................... 107
Adobe Illustrator CS2
JavaScript Scripting Reference 11
jpegQuality............................................................................................................................................................................ 107
layerOrder.............................................................................................................................................................................. 107
looping.................................................................................................................................................................................... 108
readOnly................................................................................................................................................................................. 108
replacing ................................................................................................................................................................................ 108
resolution............................................................................................................................................................................... 108
typename............................................................................................................................................................................... 108
ExportOptionsGIF...................................................................................................................................................................... 109
ExportOptionsGIF properties.......................................................................................................................................... 109
antiAliasing............................................................................................................................................................................ 109
artBoardClipping................................................................................................................................................................. 109
colorCount............................................................................................................................................................................. 109
colorDither............................................................................................................................................................................. 109
colorReduction..................................................................................................................................................................... 109
ditherPercent........................................................................................................................................................................ 109
horizontalScale .................................................................................................................................................................... 109
infoLossPercent ................................................................................................................................................................... 109
interlaced ............................................................................................................................................................................... 109
matte ....................................................................................................................................................................................... 109
matteColor............................................................................................................................................................................. 109
saveAsHTML.......................................................................................................................................................................... 109
transparency ......................................................................................................................................................................... 109
typename............................................................................................................................................................................... 109
verticalScale .......................................................................................................................................................................... 110
webSnap ................................................................................................................................................................................ 110
ExportOptionsJPEG................................................................................................................................................................... 111
ExportOptionsJPEG properties ...................................................................................................................................... 111
antiAliasing............................................................................................................................................................................ 111
artBoardClipping................................................................................................................................................................. 111
blurAmount........................................................................................................................................................................... 111
horizontalScale .................................................................................................................................................................... 111
matte ....................................................................................................................................................................................... 111
matteColor............................................................................................................................................................................. 111
optimization.......................................................................................................................................................................... 111
qualitySetting ....................................................................................................................................................................... 111
saveAsHTML.......................................................................................................................................................................... 111
typename............................................................................................................................................................................... 111
verticalScale .......................................................................................................................................................................... 111
ExportOptionsPhotoshop ...................................................................................................................................................... 112
ExportOptionsPhotoshop properties .......................................................................................................................... 112
antiAliasing............................................................................................................................................................................ 112
compatibility......................................................................................................................................................................... 112
editableText .......................................................................................................................................................................... 112
embedICCProfile ................................................................................................................................................................. 112
imageColorSpace................................................................................................................................................................ 112
maximumEditability........................................................................................................................................................... 112
resolution............................................................................................................................................................................... 112
typename............................................................................................................................................................................... 112
warnings................................................................................................................................................................................. 112
writeLayers ............................................................................................................................................................................ 112
ExportOptionsPNG8 ..............................................................................................................
................................................... 113
Adobe Illustrator CS2
JavaScript Scripting Reference 12
ExportOptionsPNG8 properties..................................................................................................................................... 113
antiAliasing............................................................................................................................................................................ 113
artBoardClipping................................................................................................................................................................. 113
colorCount............................................................................................................................................................................. 113
colorDither............................................................................................................................................................................. 113
colorReduction..................................................................................................................................................................... 113
ditherPercent........................................................................................................................................................................ 113
horizontalScale .................................................................................................................................................................... 113
interlaced ............................................................................................................................................................................... 113
matte ....................................................................................................................................................................................... 113
matteColor............................................................................................................................................................................. 113
saveAsHTML.......................................................................................................................................................................... 113
transparency ......................................................................................................................................................................... 113
typename............................................................................................................................................................................... 113
verticalScale .......................................................................................................................................................................... 113
webSnap ................................................................................................................................................................................ 113
ExportOptionsPNG24............................................................................................................................................................... 115
ExportOptionsPNG24 properties .................................................................................................................................. 115
antiAliasing............................................................................................................................................................................ 115
artBoardClipping................................................................................................................................................................. 115
horizontalScale .................................................................................................................................................................... 115
matte ....................................................................................................................................................................................... 115
matteColor............................................................................................................................................................................. 115
saveAsHTML.......................................................................................................................................................................... 115
transparency ......................................................................................................................................................................... 115
typename............................................................................................................................................................................... 115
verticalScale .......................................................................................................................................................................... 115
ExportOptionsSVG .................................................................................................................................................................... 116
ExportOptionsSVG properties ........................................................................................................................................ 116
compressed........................................................................................................................................................................... 116
coordinatePrecision ........................................................................................................................................................... 116
cssProperties......................................................................................................................................................................... 116
documentEncoding ........................................................................................................................................................... 116
DTD........................................................................................................................................................................................... 116
embedRasterImages .......................................................................................................................................................... 116
fontSubsetting ..................................................................................................................................................................... 116
fontType ................................................................................................................................................................................. 116
includeFileInfo ..................................................................................................................................................................... 116
includeVariablesAndDatasets ........................................................................................................................................ 116
optimizeForSVGViewer ..................................................................................................................................................... 116
preserveEditability.............................................................................................................................................................. 116
slices......................................................................................................................................................................................... 117
sVGAutoKerning.................................................................................................................................................................. 117
sVGTextOnPath.................................................................................................................................................................... 117
typename............................................................................................................................................................................... 117
Gradient ........................................................................................................................................................................................ 118
Gradient properties............................................................................................................................................................ 118
gradientStops....................................................................................................................................................................... 118
name........................................................................................................................................................................................ 118
parent...................................................................................................................................................................................... 118
type ...........................................................................................................................
............................................................... 118
Adobe Illustrator CS2
JavaScript Scripting Reference 13
typename............................................................................................................................................................................... 118
Gradient methods............................................................................................................................................................... 118
remove.................................................................................................................................................................................... 118
GradientColor ............................................................................................................................................................................. 120
GradientColor properties ................................................................................................................................................. 120
angle........................................................................................................................................................................................ 120
gradient .................................................................................................................................................................................. 120
hiliteAngle ............................................................................................................................................................................. 120
hiliteLength........................................................................................................................................................................... 120
length ...................................................................................................................................................................................... 120
matrix ...................................................................................................................................................................................... 120
origin ....................................................................................................................................................................................... 120
typename............................................................................................................................................................................... 120
Gradients ...................................................................................................................................................................................... 121
Gradients properties.......................................................................................................................................................... 121
length ...................................................................................................................................................................................... 121
parent...................................................................................................................................................................................... 121
typename............................................................................................................................................................................... 121
Gradients methods............................................................................................................................................................. 121
add............................................................................................................................................................................................ 121
getByName............................................................................................................................................................................ 121
index ........................................................................................................................................................................................ 121
removeAll............................................................................................................................................................................... 121
GradientStop............................................................................................................................................................................... 122
GradientStop properties................................................................................................................................................... 122
color ......................................................................................................................................................................................... 122
midPoint................................................................................................................................................................................. 122
parent...................................................................................................................................................................................... 122
rampPoint.............................................................................................................................................................................. 122
typename............................................................................................................................................................................... 122
GradientStop methods ..................................................................................................................................................... 122
remove.................................................................................................................................................................................... 122
GradientStops............................................................................................................................................................................. 123
GradientStops properties................................................................................................................................................. 123
length ...................................................................................................................................................................................... 123
parent...................................................................................................................................................................................... 123
typename............................................................................................................................................................................... 123
GradientStops methods ................................................................................................................................................... 123
add............................................................................................................................................................................................ 123
index ........................................................................................................................................................................................ 123
removeAll............................................................................................................................................................................... 123
GraphicStyle ................................................................................................................................................................................ 124
GraphicStyle properties.................................................................................................................................................... 124
name........................................................................................................................................................................................ 124
parent...................................................................................................................................................................................... 124
typename............................................................................................................................................................................... 124
GraphicStyle methods....................................................................................................................................................... 124
applyTo ................................................................................................................................................................................... 124
remove.................................................................................................................................................................................... 124
GraphicStyles .............................................................................................................................................................................. 125
GraphicStyles properties .......................................................................................................
........................................... 125
Adobe Illustrator CS2
JavaScript Scripting Reference 14
length ...................................................................................................................................................................................... 125
parent...................................................................................................................................................................................... 125
typename............................................................................................................................................................................... 125
GraphicStyles methods..................................................................................................................................................... 125
getByName............................................................................................................................................................................ 125
index ........................................................................................................................................................................................ 125
removeAll............................................................................................................................................................................... 125
GraphItem.................................................................................................................................................................................... 126
GraphItem properties........................................................................................................................................................ 126
artworkKnockout ................................................................................................................................................................ 126
blendingMode ..................................................................................................................................................................... 126
contentVariable ................................................................................................................................................................... 126
controlBounds...................................................................................................................................................................... 126
editable................................................................................................................................................................................... 126
geometricBounds ............................................................................................................................................................... 126
height ...................................................................................................................................................................................... 126
hidden..................................................................................................................................................................................... 126
isIsolated ................................................................................................................................................................................ 126
layer.......................................................................................................................................................................................... 126
left............................................................................................................................................................................................. 126
locked...................................................................................................................................................................................... 126
name........................................................................................................................................................................................ 126
opacity .................................................................................................................................................................................... 126
parent...................................................................................................................................................................................... 126
position................................................................................................................................................................................... 126
selected................................................................................................................................................................................... 126
sliced........................................................................................................................................................................................ 126
tags........................................................................................................................................................................................... 126
top ............................................................................................................................................................................................ 126
typename............................................................................................................................................................................... 126
uRL............................................................................................................................................................................................ 127
visibilityVariable .................................................................................................................................................................. 127
visibleBounds ....................................................................................................................................................................... 127
width........................................................................................................................................................................................ 127
wrapInside ............................................................................................................................................................................. 127
wrapOffset............................................................................................................................................................................. 127
wrapped ................................................................................................................................................................................. 127
zOrderPosition ..................................................................................................................................................................... 127
GraphItem methods........................................................................................................................................................... 127
duplicate ................................................................................................................................................................................ 127
move........................................................................................................................................................................................ 127
remove.................................................................................................................................................................................... 127
resize........................................................................................................................................................................................ 127
rotate ....................................................................................................................................................................................... 128
transform................................................................................................................................................................................ 128
translate.................................................................................................................................................................................. 128
zOrder...................................................................................................................................................................................... 128
GraphItems .................................................................................................................................................................................. 129
GraphItems properties...................................................................................................................................................... 129
length ...................................................................................................................................................................................... 129
parent.........................................................................................................................
............................................................. 129
Adobe Illustrator CS2
JavaScript Scripting Reference 15
typename............................................................................................................................................................................... 129
GraphItems methods......................................................................................................................................................... 129
getByName............................................................................................................................................................................ 129
index ........................................................................................................................................................................................ 129
removeAll............................................................................................................................................................................... 129
GrayColor...................................................................................................................................................................................... 130
GrayColor properties ......................................................................................................................................................... 130
gray .......................................................................................................................................................................................... 130
typename............................................................................................................................................................................... 130
GroupItem.................................................................................................................................................................................... 131
GroupItem properties........................................................................................................................................................ 131
artworkKnockout ................................................................................................................................................................ 131
blendingMode ..................................................................................................................................................................... 131
clipped .................................................................................................................................................................................... 131
compoundPathItems......................................................................................................................................................... 131
controlBounds...................................................................................................................................................................... 131
editable................................................................................................................................................................................... 131
geometricBounds ............................................................................................................................................................... 131
graphItems ............................................................................................................................................................................ 131
groupItems............................................................................................................................................................................ 131
height ...................................................................................................................................................................................... 131
hidden..................................................................................................................................................................................... 131
isIsolated ................................................................................................................................................................................ 131
layer.......................................................................................................................................................................................... 131
left............................................................................................................................................................................................. 131
legacyTextItems................................................................................................................................................................... 131
locked...................................................................................................................................................................................... 131
meshItems ............................................................................................................................................................................. 131
name........................................................................................................................................................................................ 131
opacity .................................................................................................................................................................................... 131
pageItems.............................................................................................................................................................................. 132
parent...................................................................................................................................................................................... 132
pathItems............................................................................................................................................................................... 132
placedItems........................................................................................................................................................................... 132
pluginItems ........................................................................................................................................................................... 132
position................................................................................................................................................................................... 132
rasterItems............................................................................................................................................................................. 132
selected................................................................................................................................................................................... 132
sliced........................................................................................................................................................................................ 132
symbolItems ......................................................................................................................................................................... 132
tags........................................................................................................................................................................................... 132
textFrames............................................................................................................................................................................. 132
top ............................................................................................................................................................................................ 132
typename............................................................................................................................................................................... 132
uRL............................................................................................................................................................................................ 132
visibilityVariable .................................................................................................................................................................. 132
visibleBounds ....................................................................................................................................................................... 132
width........................................................................................................................................................................................ 132
wrapInside ............................................................................................................................................................................. 132
wrapOffset............................................................................................................................................................................. 132
wrapped ........................................................................................................................
......................................................... 132
Adobe Illustrator CS2
JavaScript Scripting Reference 16
zOrderPosition ..................................................................................................................................................................... 132
GroupItem methods .......................................................................................................................................................... 133
duplicate ................................................................................................................................................................................ 133
move........................................................................................................................................................................................ 133
remove.................................................................................................................................................................................... 133
resize........................................................................................................................................................................................ 133
rotate ....................................................................................................................................................................................... 133
transform................................................................................................................................................................................ 133
translate.................................................................................................................................................................................. 133
zOrder...................................................................................................................................................................................... 133
GroupItems.................................................................................................................................................................................. 135
GroupItems properties...................................................................................................................................................... 135
length ...................................................................................................................................................................................... 135
parent...................................................................................................................................................................................... 135
typename............................................................................................................................................................................... 135
GroupItems methods ........................................................................................................................................................ 135
add............................................................................................................................................................................................ 135
createFromFile ..................................................................................................................................................................... 135
getByName............................................................................................................................................................................ 135
index ........................................................................................................................................................................................ 135
removeAll............................................................................................................................................................................... 135
IllustratorSaveOptions............................................................................................................................................................. 136
IllustratorSaveOptions properties................................................................................................................................. 136
compatibility......................................................................................................................................................................... 136
compressed........................................................................................................................................................................... 136
embedICCProfile ................................................................................................................................................................. 136
embedLinkedFiles............................................................................................................................................................... 136
flattenOutput........................................................................................................................................................................ 136
fontSubsetThreshold ......................................................................................................................................................... 136
overprint................................................................................................................................................................................. 136
pdfCompatible..................................................................................................................................................................... 136
typename............................................................................................................................................................................... 136
Ink.................................................................................................................................................................................................... 137
Ink properties ....................................................................................................................................................................... 137
inkInfo ..................................................................................................................................................................................... 137
name........................................................................................................................................................................................ 137
typename............................................................................................................................................................................... 137
InkInfo............................................................................................................................................................................................ 137
InkInfo properties................................................................................................................................................................ 137
angle........................................................................................................................................................................................ 137
customColor ......................................................................................................................................................................... 137
density..................................................................................................................................................................................... 137
dotShape................................................................................................................................................................................ 137
frequency............................................................................................................................................................................... 137
kind........................................................................................................................................................................................... 137
printingStatus....................................................................................................................................................................... 137
trapping.................................................................................................................................................................................. 137
trappingOrder ...................................................................................................................................................................... 137
typename............................................................................................................................................................................... 137
InsertionPoint ............................................................................................................................................................................. 139
InsertionPoints ................................................................................................................
........................................................... 139
Adobe Illustrator CS2
JavaScript Scripting Reference 17
InsertionPoints properties ............................................................................................................................................... 139
length ...................................................................................................................................................................................... 139
parent...................................................................................................................................................................................... 139
typename............................................................................................................................................................................... 139
InsertionPoints methods .................................................................................................................................................. 139
index ........................................................................................................................................................................................ 139
LabColor ....................................................................................................................................................................................... 140
LabColor properties ........................................................................................................................................................... 140
a................................................................................................................................................................................................. 140
b................................................................................................................................................................................................. 140
l .................................................................................................................................................................................................. 140
typename............................................................................................................................................................................... 140
Layer............................................................................................................................................................................................... 141
Layer properties................................................................................................................................................................... 141
artworkKnockout ................................................................................................................................................................ 141
blendingMode ..................................................................................................................................................................... 141
color ......................................................................................................................................................................................... 141
compoundPathItems......................................................................................................................................................... 141
dimPlacedImages................................................................................................................................................................ 141
graphItems ............................................................................................................................................................................ 141
groupItems............................................................................................................................................................................ 141
hasSelectedArtwork........................................................................................................................................................... 141
isIsolated ................................................................................................................................................................................ 141
layers........................................................................................................................................................................................ 141
legacyTextItems................................................................................................................................................................... 141
locked...................................................................................................................................................................................... 141
meshItems ............................................................................................................................................................................. 141
name........................................................................................................................................................................................ 141
opacity .................................................................................................................................................................................... 141
pageItems.............................................................................................................................................................................. 141
parent...................................................................................................................................................................................... 141
pathItems............................................................................................................................................................................... 142
placedItems........................................................................................................................................................................... 142
pluginItems ........................................................................................................................................................................... 142
preview ................................................................................................................................................................................... 142
printable................................................................................................................................................................................. 142
rasterItems............................................................................................................................................................................. 142
sliced........................................................................................................................................................................................ 142
symbolItems ......................................................................................................................................................................... 142
textFrames............................................................................................................................................................................. 142
typename............................................................................................................................................................................... 142
visible....................................................................................................................................................................................... 142
zOrderPosition ..................................................................................................................................................................... 142
Layer methods ..................................................................................................................................................................... 142
move........................................................................................................................................................................................ 142
remove.................................................................................................................................................................................... 142
zOrder...................................................................................................................................................................................... 142
Layers............................................................................................................................................................................................. 144
Layers properties................................................................................................................................................................. 144
length ...................................................................................................................................................................................... 144
parent.........................................................................................................................
............................................................. 144
Adobe Illustrator CS2
JavaScript Scripting Reference 18
typename............................................................................................................................................................................... 144
Layers methods.................................................................................................................................................................... 144
add............................................................................................................................................................................................ 144
getByName............................................................................................................................................................................ 144
index ........................................................................................................................................................................................ 144
removeAll............................................................................................................................................................................... 144
LegacyTextItem.......................................................................................................................................................................... 145
LegacyTextItem properties ............................................................................................................................................. 145
artworkKnockout ................................................................................................................................................................ 145
blendingMode ..................................................................................................................................................................... 145
controlBounds...................................................................................................................................................................... 145
converted............................................................................................................................................................................... 145
editable................................................................................................................................................................................... 145
geometricBounds ............................................................................................................................................................... 145
height ...................................................................................................................................................................................... 145
hidden..................................................................................................................................................................................... 145
isIsolated ................................................................................................................................................................................ 145
layer.......................................................................................................................................................................................... 145
left............................................................................................................................................................................................. 145
locked...................................................................................................................................................................................... 145
name........................................................................................................................................................................................ 145
opacity .................................................................................................................................................................................... 145
parent...................................................................................................................................................................................... 145
position................................................................................................................................................................................... 145
selected................................................................................................................................................................................... 145
sliced........................................................................................................................................................................................ 145
tags........................................................................................................................................................................................... 145
top ............................................................................................................................................................................................ 145
typename............................................................................................................................................................................... 145
uRL............................................................................................................................................................................................ 145
visibilityVariable .................................................................................................................................................................. 145
visibleBounds ....................................................................................................................................................................... 146
width........................................................................................................................................................................................ 146
wrapInside ............................................................................................................................................................................. 146
wrapOffset............................................................................................................................................................................. 146
wrapped ................................................................................................................................................................................. 146
zOrderPosition ..................................................................................................................................................................... 146
LegacyTextItem methods ................................................................................................................................................ 146
convertToNative.................................................................................................................................................................. 146
duplicate ................................................................................................................................................................................ 146
move........................................................................................................................................................................................ 146
remove.................................................................................................................................................................................... 146
resize........................................................................................................................................................................................ 146
rotate ....................................................................................................................................................................................... 146
transform................................................................................................................................................................................ 147
translate.................................................................................................................................................................................. 147
zOrder...................................................................................................................................................................................... 147
LegacyTextItems........................................................................................................................................................................ 148
LegacyTextItems properties............................................................................................................................................ 148
length ...................................................................................................................................................................................... 148
parent.........................................................................................................................
............................................................. 148
Adobe Illustrator CS2
JavaScript Scripting Reference 19
typename............................................................................................................................................................................... 148
LegacyTextItems methods .............................................................................................................................................. 148
convertToNative.................................................................................................................................................................. 148
getByName............................................................................................................................................................................ 148
index ........................................................................................................................................................................................ 148
removeAll............................................................................................................................................................................... 148
Lines ............................................................................................................................................................................................... 149
Lines properties ................................................................................................................................................................... 149
length ...................................................................................................................................................................................... 149
parent...................................................................................................................................................................................... 149
typename............................................................................................................................................................................... 149
Lines methods...................................................................................................................................................................... 149
index ........................................................................................................................................................................................ 149
removeAll............................................................................................................................................................................... 149
Matrix............................................................................................................................................................................................. 150
Matrix properties................................................................................................................................................................. 150
mValueA ................................................................................................................................................................................. 150
mValueB ................................................................................................................................................................................. 150
mValueC ................................................................................................................................................................................. 150
mValueD................................................................................................................................................................................. 150
mValueTX............................................................................................................................................................................... 150
mValueTY ............................................................................................................................................................................... 150
typename............................................................................................................................................................................... 150
MeshItem...................................................................................................................................................................................... 151
MeshItem properties ......................................................................................................................................................... 151
artworkKnockout ................................................................................................................................................................ 151
blendingMode ..................................................................................................................................................................... 151
controlBounds...................................................................................................................................................................... 151
editable................................................................................................................................................................................... 151
geometricBounds ............................................................................................................................................................... 151
height ...................................................................................................................................................................................... 151
hidden..................................................................................................................................................................................... 151
isIsolated ................................................................................................................................................................................ 151
layer.......................................................................................................................................................................................... 151
left............................................................................................................................................................................................. 151
locked...................................................................................................................................................................................... 151
name........................................................................................................................................................................................ 151
opacity .................................................................................................................................................................................... 151
parent...................................................................................................................................................................................... 151
position................................................................................................................................................................................... 151
selected................................................................................................................................................................................... 151
sliced........................................................................................................................................................................................ 151
tags........................................................................................................................................................................................... 151
top ............................................................................................................................................................................................ 151
typename............................................................................................................................................................................... 151
uRL............................................................................................................................................................................................ 151
visibilityVariable .................................................................................................................................................................. 151
visibleBounds ....................................................................................................................................................................... 151
width........................................................................................................................................................................................ 152
wrapInside ............................................................................................................................................................................. 152
wrapOffset.....................................................................................................................
........................................................ 152
Adobe Illustrator CS2
JavaScript Scripting Reference 20
wrapped ................................................................................................................................................................................. 152
zOrderPosition ..................................................................................................................................................................... 152
MeshItem methods ............................................................................................................................................................ 152
duplicate ................................................................................................................................................................................ 152
move........................................................................................................................................................................................ 152
remove.................................................................................................................................................................................... 152
resize........................................................................................................................................................................................ 152
rotate ....................................................................................................................................................................................... 152
transform................................................................................................................................................................................ 152
translate.................................................................................................................................................................................. 153
zOrder...................................................................................................................................................................................... 153
MeshItems.................................................................................................................................................................................... 154
MeshItems properties........................................................................................................................................................ 154
length ...................................................................................................................................................................................... 154
parent...................................................................................................................................................................................... 154
typename............................................................................................................................................................................... 154
MeshItems methods .......................................................................................................................................................... 154
getByName............................................................................................................................................................................ 154
index ........................................................................................................................................................................................ 154
removeAll............................................................................................................................................................................... 154
NoColor......................................................................................................................................................................................... 155
NoColor properties............................................................................................................................................................. 155
typename............................................................................................................................................................................... 155
OpenOptions .............................................................................................................................................................................. 156
OpenOptions properties .................................................................................................................................................. 156
typename............................................................................................................................................................................... 156
updateLegacyText .............................................................................................................................................................. 156
PageItems..................................................................................................................................................................................... 157
PageItems properties ........................................................................................................................................................ 157
length ...................................................................................................................................................................................... 157
parent...................................................................................................................................................................................... 157
typename............................................................................................................................................................................... 157
PageItems methods ........................................................................................................................................................... 157
getByName............................................................................................................................................................................ 157
index ........................................................................................................................................................................................ 157
removeAll............................................................................................................................................................................... 157
Paper.............................................................................................................................................................................................. 159
Paper properties.................................................................................................................................................................. 159
name........................................................................................................................................................................................ 159
paperInfo................................................................................................................................................................................ 159
typename............................................................................................................................................................................... 159
PaperInfo ...................................................................................................................................................................................... 159
PaperInfo properties.......................................................................................................................................................... 159
customPaper......................................................................................................................................................................... 159
height ...................................................................................................................................................................................... 159
imageableArea..................................................................................................................................................................... 159
typename............................................................................................................................................................................... 159
width........................................................................................................................................................................................ 159
ParagraphAttributes................................................................................................................................................................. 161
ParagraphAttributes properties .................................................................................................................................... 161
autoLeadingAmount ..............................................................................................................
........................................... 161
Adobe Illustrator CS2
JavaScript Scripting Reference 21
bunriKinshi ............................................................................................................................................................................ 161
burasagariType .................................................................................................................................................................... 161
desiredGlyphScaling.......................................................................................................................................................... 161
desiredLetterSpacing ........................................................................................................................................................ 161
desiredWordSpacing ......................................................................................................................................................... 161
everyLineComposer ........................................................................................................................................................... 161
firstLineIndent...................................................................................................................................................................... 161
hyphenateCapitalizedWords .......................................................................................................................................... 161
hyphenation ......................................................................................................................................................................... 161
hyphenationPreference.................................................................................................................................................... 161
hyphenationZone ............................................................................................................................................................... 161
justification............................................................................................................................................................................ 161
kinsoku.................................................................................................................................................................................... 161
kinsokuOrder ........................................................................................................................................................................ 161
kurikaeshiMojiShori............................................................................................................................................................ 161
leadingType .......................................................................................................................................................................... 161
leftIndent................................................................................................................................................................................ 161
maximumConsecutiveHyphens .................................................................................................................................... 161
maximumGlyphScaling .................................................................................................................................................... 161
maximumLetterSpacing................................................................................................................................................... 162
maximumWordSpacing.................................................................................................................................................... 162
minimumAfterHyphen...................................................................................................................................................... 162
minimumBeforeHyphen................................................................................................................................................... 162
minimumGlyphScaling ..................................................................................................................................................... 162
minimumHyphenatedWordSize.................................................................................................................................... 162
minimumLetterSpacing.................................................................................................................................................... 162
minimumWordSpacing .................................................................................................................................................... 162
mojikumi ................................................................................................................................................................................ 162
parent...................................................................................................................................................................................... 162
rightIndent ............................................................................................................................................................................ 162
romanHanging..................................................................................................................................................................... 162
singleWordJustification .................................................................................................................................................... 162
spaceAfter.............................................................................................................................................................................. 162
spaceBefore........................................................................................................................................................................... 162
tabStops ................................................................................................................................................................................. 162
typename............................................................................................................................................................................... 162
Paragraphs................................................................................................................................................................................... 164
Paragraphs properties....................................................................................................................................................... 164
length ...................................................................................................................................................................................... 164
parent...................................................................................................................................................................................... 164
typename............................................................................................................................................................................... 164
Paragraphs methods.......................................................................................................................................................... 164
add............................................................................................................................................................................................ 164
addBefore .............................................................................................................................................................................. 164
index ........................................................................................................................................................................................ 164
removeAll............................................................................................................................................................................... 164
ParagraphStyle........................................................................................................................................................................... 165
ParagraphStyle properties............................................................................................................................................... 165
characterAttributes ............................................................................................................................................................ 165
name........................................................................................................................................................................................ 165
paragraphAttributes ............................................................................................................
.............................................. 165
Adobe Illustrator CS2
JavaScript Scripting Reference 22
parent...................................................................................................................................................................................... 165
typename............................................................................................................................................................................... 165
ParagraphStyle methods.................................................................................................................................................. 165
applyTo ................................................................................................................................................................................... 165
remove.................................................................................................................................................................................... 165
ParagraphStyles ......................................................................................................................................................................... 166
ParagraphStyles properties............................................................................................................................................. 166
length ...................................................................................................................................................................................... 166
parent...................................................................................................................................................................................... 166
typename............................................................................................................................................................................... 166
ParagraphStyles methods................................................................................................................................................ 166
add............................................................................................................................................................................................ 166
getByName............................................................................................................................................................................ 166
index ........................................................................................................................................................................................ 166
removeAll............................................................................................................................................................................... 166
PathItem ....................................................................................................................................................................................... 168
PathItem properties ........................................................................................................................................................... 168
area........................................................................................................................................................................................... 168
artworkKnockout ................................................................................................................................................................ 168
blendingMode ..................................................................................................................................................................... 168
clipping................................................................................................................................................................................... 168
closed ...................................................................................................................................................................................... 168
controlBounds...................................................................................................................................................................... 168
editable................................................................................................................................................................................... 168
evenodd ................................................................................................................................................................................. 168
fillColor.................................................................................................................................................................................... 168
filled ......................................................................................................................................................................................... 168
fillOverprint ........................................................................................................................................................................... 168
geometricBounds ............................................................................................................................................................... 168
guides...................................................................................................................................................................................... 168
height ...................................................................................................................................................................................... 168
hidden..................................................................................................................................................................................... 168
isIsolated ................................................................................................................................................................................ 168
layer.......................................................................................................................................................................................... 168
left............................................................................................................................................................................................. 168
locked...................................................................................................................................................................................... 168
name........................................................................................................................................................................................ 168
note.......................................................................................................................................................................................... 169
opacity .................................................................................................................................................................................... 169
parent...................................................................................................................................................................................... 169
pathPoints ............................................................................................................................................................................. 169
polarity.................................................................................................................................................................................... 169
position................................................................................................................................................................................... 169
resolution............................................................................................................................................................................... 169
selected................................................................................................................................................................................... 169
selectedPathPoints............................................................................................................................................................. 169
sliced........................................................................................................................................................................................ 169
strokeCap ............................................................................................................................................................................... 169
strokeColor ............................................................................................................................................................................ 169
stroked .................................................................................................................................................................................... 169
strokeDashes ...................................................................................................................
..................................................... 169
Adobe Illustrator CS2
JavaScript Scripting Reference 23
strokeDashOffset................................................................................................................................................................. 169
strokeJoin............................................................................................................................................................................... 169
strokeMiterLimit .................................................................................................................................................................. 169
strokeOverprint.................................................................................................................................................................... 169
strokeWidth........................................................................................................................................................................... 169
tags........................................................................................................................................................................................... 169
top ............................................................................................................................................................................................ 169
typename............................................................................................................................................................................... 169
uRL............................................................................................................................................................................................ 169
visibilityVariable .................................................................................................................................................................. 169
visibleBounds ....................................................................................................................................................................... 170
width........................................................................................................................................................................................ 170
wrapInside ............................................................................................................................................................................. 170
wrapOffset............................................................................................................................................................................. 170
wrapped ................................................................................................................................................................................. 170
zOrderPosition ..................................................................................................................................................................... 170
PathItem methods.............................................................................................................................................................. 170
duplicate ................................................................................................................................................................................ 170
move........................................................................................................................................................................................ 170
remove.................................................................................................................................................................................... 170
resize........................................................................................................................................................................................ 170
rotate ....................................................................................................................................................................................... 170
setEntirePath ........................................................................................................................................................................ 170
transform................................................................................................................................................................................ 171
translate.................................................................................................................................................................................. 171
zOrder...................................................................................................................................................................................... 171
PathItems ..................................................................................................................................................................................... 172
PathItems properties ......................................................................................................................................................... 172
length ...................................................................................................................................................................................... 172
parent...................................................................................................................................................................................... 172
typename............................................................................................................................................................................... 172
PathItems methods............................................................................................................................................................ 172
add............................................................................................................................................................................................ 172
ellipse ...................................................................................................................................................................................... 172
getByName............................................................................................................................................................................ 172
index ........................................................................................................................................................................................ 172
polygon .................................................................................................................................................................................. 172
rectangle ................................................................................................................................................................................ 172
removeAll............................................................................................................................................................................... 172
roundedRectangle.............................................................................................................................................................. 173
star............................................................................................................................................................................................ 173
PathPoint...................................................................................................................................................................................... 174
PathPoint properties.......................................................................................................................................................... 174
anchor ..................................................................................................................................................................................... 174
leftDirection .......................................................................................................................................................................... 174
parent...................................................................................................................................................................................... 174
pointType............................................................................................................................................................................... 174
rightDirection ....................................................................................................................................................................... 174
selected................................................................................................................................................................................... 174
typename............................................................................................................................................................................... 174
PathPoint methods ..............................................................................................................
.............................................. 174
Adobe Illustrator CS2
JavaScript Scripting Reference 24
remove.................................................................................................................................................................................... 174
PathPoints.................................................................................................................................................................................... 175
PathPoints properties........................................................................................................................................................ 175
length ...................................................................................................................................................................................... 175
parent...................................................................................................................................................................................... 175
typename............................................................................................................................................................................... 175
PathPoints methods........................................................................................................................................................... 175
add............................................................................................................................................................................................ 175
index ........................................................................................................................................................................................ 175
removeAll............................................................................................................................................................................... 175
Pattern........................................................................................................................................................................................... 176
Pattern properties............................................................................................................................................................... 176
name........................................................................................................................................................................................ 176
parent...................................................................................................................................................................................... 176
typename............................................................................................................................................................................... 176
Pattern methods.................................................................................................................................................................. 176
remove.................................................................................................................................................................................... 176
toString................................................................................................................................................................................... 176
Patterns......................................................................................................................................................................................... 176
Patterns properties............................................................................................................................................................. 176
length ...................................................................................................................................................................................... 176
parent...................................................................................................................................................................................... 176
typename............................................................................................................................................................................... 176
Patterns methods................................................................................................................................................................ 176
add............................................................................................................................................................................................ 176
getByName............................................................................................................................................................................ 176
index ........................................................................................................................................................................................ 177
removeAll............................................................................................................................................................................... 177
PatternColor ................................................................................................................................................................................ 178
PatternColor properties.................................................................................................................................................... 178
matrix ...................................................................................................................................................................................... 178
pattern .................................................................................................................................................................................... 178
reflect....................................................................................................................................................................................... 178
reflectAngle........................................................................................................................................................................... 178
rotation ................................................................................................................................................................................... 178
scaleFactor............................................................................................................................................................................. 178
shearAngle............................................................................................................................................................................. 178
shearAxis ................................................................................................................................................................................ 178
shiftAngle............................................................................................................................................................................... 178
shiftDistance ......................................................................................................................................................................... 178
typename............................................................................................................................................................................... 178
PDFFileOptions .......................................................................................................................................................................... 180
PDFFileOptions properties .............................................................................................................................................. 180
pageToOpen......................................................................................................................................................................... 180
parent...................................................................................................................................................................................... 180
pDFCropToBox..................................................................................................................................................................... 180
typename............................................................................................................................................................................... 180
PDFSaveOptions ........................................................................................................................................................................ 181
PDFSaveOptions properties............................................................................................................................................ 181
acrobatLayers ....................................................................................................................................................................... 181
bleedLink......................................................................................................................
.......................................................... 181
Adobe Illustrator CS2
JavaScript Scripting Reference 25
bleedOffsetRect................................................................................................................................................................... 181
colorBars................................................................................................................................................................................. 181
colorCompression............................................................................................................................................................... 181
colorConversionID.............................................................................................................................................................. 181
colorDestinationID ............................................................................................................................................................. 181
colorDownsampling .......................................................................................................................................................... 181
colorDownsamplingImageThreshold.......................................................................................................................... 181
colorDownsamplingMethod .......................................................................................................................................... 181
colorProfileID........................................................................................................................................................................ 181
colorTileSize .......................................................................................................................................................................... 181
compatibility......................................................................................................................................................................... 181
compressArt.......................................................................................................................................................................... 182
documentPassword ........................................................................................................................................................... 182
enableAccess ........................................................................................................................................................................ 182
enableCopy ........................................................................................................................................................................... 182
enableCopyAccess.............................................................................................................................................................. 182
enablePlainText ................................................................................................................................................................... 182
flattenerOptions .................................................................................................................................................................. 182
flattenerPreset...................................................................................................................................................................... 182
fontSubsetThreshold ......................................................................................................................................................... 182
generateThumbnails ......................................................................................................................................................... 182
grayscaleCompression ...................................................................................................................................................... 182
grayscaleDownsampling.................................................................................................................................................. 182
grayscaleDownsamplingImageThreshold................................................................................................................. 182
grayscaleDownsamplingMethod.................................................................................................................................. 183
grayscaleTileSize ................................................................................................................................................................. 183
monochromeCompression ............................................................................................................................................. 183
monochromeDownsampling ......................................................................................................................................... 183
monochromeDownsamplingImageThreshold ........................................................................................................ 183
monochromeDownsamplingMethod ......................................................................................................................... 183
offset........................................................................................................................................................................................ 183
optimization.......................................................................................................................................................................... 183
outputCondition ................................................................................................................................................................. 183
outputConditionID ............................................................................................................................................................. 183
pageInformation ................................................................................................................................................................. 183
pageMarksType ................................................................................................................................................................... 183
pDFAllowPrinting................................................................................................................................................................ 183
pDFChangesAllowed......................................................................................................................................................... 183
pDFPreset............................................................................................................................................................................... 184
pDFXStandard...................................................................................................................................................................... 184
pDFXStandardDescription............................................................................................................................................... 184
permissionPassword.......................................................................................................................................................... 184
preserveEditability.............................................................................................................................................................. 184
printerResolution ................................................................................................................................................................ 184
registrationMarks ................................................................................................................................................................ 184
requireDocumentPassword ............................................................................................................................................ 184
requirePermissionPassword............................................................................................................................................ 184
trapped ................................................................................................................................................................................... 184
trimMarks ............................................................................................................................................................................... 184
trimMarkWeight .................................................................................................................................................................. 184
typename............................................................................................................................................................................... 184
Adobe Illustrator CS2
JavaScript Scripting Reference 26
viewAfterSaving .................................................................................................................................................................. 184
PhotoshopFileOptions ............................................................................................................................................................ 186
PhotoshopFileOptions properties ................................................................................................................................ 186
parent...................................................................................................................................................................................... 186
pixelAspectRatioCorrection ............................................................................................................................................ 186
preserveImageMaps .......................................................................................................................................................... 186
preserveLayers ..................................................................................................................................................................... 186
preserveSlices....................................................................................................................................................................... 186
typename............................................................................................................................................................................... 186
PlacedItem ................................................................................................................................................................................... 187
PlacedItem properties....................................................................................................................................................... 187
artworkKnockout ................................................................................................................................................................ 187
blendingMode ..................................................................................................................................................................... 187
boundingBox........................................................................................................................................................................ 187
contentVariable ................................................................................................................................................................... 187
controlBounds...................................................................................................................................................................... 187
editable................................................................................................................................................................................... 187
file ............................................................................................................................................................................................. 187
geometricBounds ............................................................................................................................................................... 187
height ...................................................................................................................................................................................... 187
hidden..................................................................................................................................................................................... 187
isIsolated ................................................................................................................................................................................ 187
layer.......................................................................................................................................................................................... 187
left............................................................................................................................................................................................. 187
locked...................................................................................................................................................................................... 187
matrix ...................................................................................................................................................................................... 187
name........................................................................................................................................................................................ 187
opacity .................................................................................................................................................................................... 187
parent...................................................................................................................................................................................... 187
position................................................................................................................................................................................... 187
selected................................................................................................................................................................................... 187
sliced........................................................................................................................................................................................ 187
tags........................................................................................................................................................................................... 188
top ............................................................................................................................................................................................ 188
typename............................................................................................................................................................................... 188
uRL............................................................................................................................................................................................ 188
visibilityVariable .................................................................................................................................................................. 188
visibleBounds ....................................................................................................................................................................... 188
width........................................................................................................................................................................................ 188
wrapInside ............................................................................................................................................................................. 188
wrapOffset............................................................................................................................................................................. 188
wrapped ................................................................................................................................................................................. 188
zOrderPosition ..................................................................................................................................................................... 188
PlacedItem methods.......................................................................................................................................................... 188
duplicate ................................................................................................................................................................................ 188
embed..................................................................................................................................................................................... 188
move........................................................................................................................................................................................ 188
remove.................................................................................................................................................................................... 188
resize........................................................................................................................................................................................ 189
rotate ....................................................................................................................................................................................... 189
trace ..........................................................................................................................
............................................................... 189
Adobe Illustrator CS2
JavaScript Scripting Reference 27
transform................................................................................................................................................................................ 189
translate.................................................................................................................................................................................. 189
zOrder...................................................................................................................................................................................... 189
PlacedItems ................................................................................................................................................................................. 191
PlacedItems properties ..................................................................................................................................................... 191
length ...................................................................................................................................................................................... 191
parent...................................................................................................................................................................................... 191
typename............................................................................................................................................................................... 191
PlacedItems methods........................................................................................................................................................ 191
add............................................................................................................................................................................................ 191
getByName............................................................................................................................................................................ 191
index ........................................................................................................................................................................................ 191
removeAll............................................................................................................................................................................... 191
PluginItem.................................................................................................................................................................................... 192
PluginItem properties ....................................................................................................................................................... 192
artworkKnockout ................................................................................................................................................................ 192
blendingMode ..................................................................................................................................................................... 192
controlBounds...................................................................................................................................................................... 192
editable................................................................................................................................................................................... 192
geometricBounds ............................................................................................................................................................... 192
height ...................................................................................................................................................................................... 192
hidden..................................................................................................................................................................................... 192
isIsolated ................................................................................................................................................................................ 192
isTracing ................................................................................................................................................................................. 192
layer.......................................................................................................................................................................................... 192
left............................................................................................................................................................................................. 192
locked...................................................................................................................................................................................... 192
name........................................................................................................................................................................................ 192
opacity .................................................................................................................................................................................... 192
parent...................................................................................................................................................................................... 192
position................................................................................................................................................................................... 192
selected................................................................................................................................................................................... 192
sliced........................................................................................................................................................................................ 192
tags........................................................................................................................................................................................... 192
top ............................................................................................................................................................................................ 192
tracing ..................................................................................................................................................................................... 193
typename............................................................................................................................................................................... 193
uRL............................................................................................................................................................................................ 193
visibilityVariable .................................................................................................................................................................. 193
visibleBounds ....................................................................................................................................................................... 193
width........................................................................................................................................................................................ 193
wrapInside ............................................................................................................................................................................. 193
wrapOffset............................................................................................................................................................................. 193
wrapped ................................................................................................................................................................................. 193
zOrderPosition ..................................................................................................................................................................... 193
PluginItem methods .......................................................................................................................................................... 193
duplicate ................................................................................................................................................................................ 193
move........................................................................................................................................................................................ 193
remove.................................................................................................................................................................................... 193
resize........................................................................................................................................................................................ 193
rotate .........................................................................................................................
.............................................................. 194
Adobe Illustrator CS2
JavaScript Scripting Reference 28
transform................................................................................................................................................................................ 194
translate.................................................................................................................................................................................. 194
zOrder...................................................................................................................................................................................... 194
PluginItems.................................................................................................................................................................................. 195
PluginItems properties...................................................................................................................................................... 195
length ...................................................................................................................................................................................... 195
parent...................................................................................................................................................................................... 195
typename............................................................................................................................................................................... 195
PluginItems methods ........................................................................................................................................................ 195
getByName............................................................................................................................................................................ 195
index ........................................................................................................................................................................................ 195
removeAll............................................................................................................................................................................... 195
PPDFile .......................................................................................................................................................................................... 196
PPDFile properties .............................................................................................................................................................. 196
name........................................................................................................................................................................................ 196
pPDInfo................................................................................................................................................................................... 196
typename............................................................................................................................................................................... 196
PPDFileInfo .................................................................................................................................................................................. 196
PPDFileInfo properties ...................................................................................................................................................... 196
languageLevel...................................................................................................................................................................... 196
PPDFilePath........................................................................................................................................................................... 196
screenList ............................................................................................................................................................................... 196
screenSpotFunctionList.................................................................................................................................................... 196
typename............................................................................................................................................................................... 196
Preferences.................................................................................................................................................................................. 199
Preferences properties...................................................................................................................................................... 199
parent...................................................................................................................................................................................... 199
PDFFileOptions .................................................................................................................................................................... 199
photoshopFileOptions...................................................................................................................................................... 199
typename............................................................................................................................................................................... 199
PrintColorManagementOptions .......................................................................................................................................... 200
PrintColorManagementOptions properties .............................................................................................................. 200
colorProfileMode................................................................................................................................................................. 200
intent ....................................................................................................................................................................................... 200
name........................................................................................................................................................................................ 200
typename............................................................................................................................................................................... 200
PrintColorSeparationOptions ............................................................................................................................................... 201
PrintColorSeparationOptions properties ................................................................................................................... 201
colorSeparationMode........................................................................................................................................................ 201
convertSpotColors.............................................................................................................................................................. 201
inkList ...................................................................................................................................................................................... 201
overPrintBlack ...................................................................................................................................................................... 201
typename............................................................................................................................................................................... 201
PrintCoordinateOptions ......................................................................................................................................................... 202
PrintCoordinateOptions properties ............................................................................................................................. 202
emulsion................................................................................................................................................................................. 202
fitToPage ................................................................................................................................................................................ 202
horizontalScale .................................................................................................................................................................... 202
orientation............................................................................................................................................................................. 202
position................................................................................................................................................................................... 202
tiling.........................................................................................................................
................................................................ 202
Adobe Illustrator CS2
JavaScript Scripting Reference 29
typename............................................................................................................................................................................... 202
verticalScale .......................................................................................................................................................................... 202
Printer ............................................................................................................................................................................................ 203
Printer properties................................................................................................................................................................ 203
name........................................................................................................................................................................................ 203
printerInfo.............................................................................................................................................................................. 203
typename............................................................................................................................................................................... 203
PrinterInfo .................................................................................................................................................................................... 203
PrinterInfo properties ........................................................................................................................................................ 203
binaryPrintingSupport ...................................................................................................................................................... 203
colorSupport......................................................................................................................................................................... 203
customPaperSupport ........................................................................................................................................................ 203
customPaperTransverseSupport................................................................................................................................... 203
deviceResolution................................................................................................................................................................. 203
inRIPSeparationSupport................................................................................................................................................... 203
maxDeviceResolution........................................................................................................................................................ 203
maxPaperHeight ................................................................................................................................................................. 203
maxPaperHeightOffset ..................................................................................................................................................... 203
maxPaperWidth................................................................................................................................................................... 203
maxPaperWidthOffset....................................................................................................................................................... 203
minPaperHeight .................................................................................................................................................................. 204
minPaperHeightOffset ...................................................................................................................................................... 204
minPaperWidth.................................................................................................................................................................... 204
minPaperWidthOffset........................................................................................................................................................ 204
paperSizes.............................................................................................................................................................................. 204
postScriptLevel .................................................................................................................................................................... 204
printerType............................................................................................................................................................................ 204
typename............................................................................................................................................................................... 204
PrintFlattenerOptions.............................................................................................................................................................. 205
PrintFlattenerOptions properties.................................................................................................................................. 205
clipComplexRegions .......................................................................................................................................................... 205
convertStrokesToOutlines ............................................................................................................................................... 205
convertTextToOutlines ..................................................................................................................................................... 205
flatteningBalance................................................................................................................................................................ 205
gradientResolution............................................................................................................................................................. 205
overprint................................................................................................................................................................................. 205
rasterizationResolution..................................................................................................................................................... 205
typename............................................................................................................................................................................... 205
PrintFontOptions....................................................................................................................................................................... 206
PrintFontOptions properties........................................................................................................................................... 206
downloadFonts.................................................................................................................................................................... 206
fontSubstitution .................................................................................................................................................................. 206
typename............................................................................................................................................................................... 206
PrintJobOptions......................................................................................................................................................................... 207
PrintJobOptions properties............................................................................................................................................. 207
bitmapResolution ............................................................................................................................................................... 207
collate...................................................................................................................................................................................... 207
copies ...................................................................................................................................................................................... 207
designation ........................................................................................................................................................................... 207
file ............................................................................................................................................................................................. 207
name...........................................................................................................................
............................................................. 207
Adobe Illustrator CS2
JavaScript Scripting Reference 30
printArea ................................................................................................................................................................................ 207
printAsBitmap ...................................................................................................................................................................... 207
reversePages......................................................................................................................................................................... 207
typename............................................................................................................................................................................... 207
PrintOptions ................................................................................................................................................................................ 209
PrintOptions properties.................................................................................................................................................... 209
colorManagementOptions .............................................................................................................................................. 209
colorSeparationOptions ................................................................................................................................................... 209
coordinateOptions ............................................................................................................................................................. 209
flattenerOptions .................................................................................................................................................................. 209
flattenerPreset...................................................................................................................................................................... 209
fontOptions........................................................................................................................................................................... 209
jobOptions............................................................................................................................................................................. 209
pageMarksOptions ............................................................................................................................................................. 209
paperOptions ....................................................................................................................................................................... 209
postScriptOptions............................................................................................................................................................... 209
PPDName ............................................................................................................................................................................... 209
printerName.......................................................................................................................................................................... 209
printPreset ............................................................................................................................................................................. 209
typename............................................................................................................................................................................... 209
PrintPageMarksOptions .......................................................................................................................................................... 211
PrintPageMarksOptions properties .............................................................................................................................. 211
bleedOffsetRect................................................................................................................................................................... 211
colorBars................................................................................................................................................................................. 211
marksOffsetRect .................................................................................................................................................................. 211
pageInfoMarks ..................................................................................................................................................................... 211
pageMarksType ................................................................................................................................................................... 211
registrationMarks ................................................................................................................................................................ 211
trimMarks ............................................................................................................................................................................... 211
trimMarksWeight ................................................................................................................................................................ 211
typename............................................................................................................................................................................... 211
PrintPaperOptions .................................................................................................................................................................... 212
PrintPaperOptions properties ........................................................................................................................................ 212
height ...................................................................................................................................................................................... 212
name........................................................................................................................................................................................ 212
offset........................................................................................................................................................................................ 212
transverse............................................................................................................................................................................... 212
typename............................................................................................................................................................................... 212
width........................................................................................................................................................................................ 212
PrintPostScriptOptions............................................................................................................................................................ 213
PrintPostScriptOptions properties................................................................................................................................ 213
binaryPrinting....................................................................................................................................................................... 213
compatibleShading............................................................................................................................................................ 213
forceContinuousTone........................................................................................................................................................ 213
imageCompression ............................................................................................................................................................ 213
negativePrinting.................................................................................................................................................................. 213
postScriptLevel .................................................................................................................................................................... 213
shadingResolution.............................................................................................................................................................. 213
typename............................................................................................................................................................................... 213
RasterItem.................................................................................................................................................................................... 214
RasterItem properties..........................................................................................................
.............................................. 214