Adobe InDesign CS5 (7.0) Object Model JS: Document

InDesign CS5

Class

Document

 A document.

QuickLinks

addEventListener, align, asynchronousExportFile, changeComposer, changeGlyph, changeGrep, changeObject, changeText, changeTransliterate, checkIn, clearFrameFittingOptions, close, createTOC, deleteUnusedTags, distribute, embed, exportFile, exportStrokeStyles, extractLabel, findGlyph, findGrep, findObject, findText, findTransliterate, getElements, importAdobeSwatchbookProcessColor, importAdobeSwatchbookSpotColor, importDtd, importFormats, importStyles, importXML, insertLabel, loadConditions, loadMasters, loadSwatches, loadXMLTags, mapStylesToXMLTags, mapXMLTagsToStyles, packageForPrint, place, print, printBooklet, recompose, redo, removeEventListener, resetAllButtons, resetAllMultiStateObjects, revert, revertToProject, save, saveACopy, saveSwatches, saveXMLTags, select, synchronizeWithVersionCue, toSource, toSpecifier, undo, updateCrossReferences

Hierarchy

Application
Document
AnchoredObjectDefault | AnchoredObjectSetting | Assignment | BaselineFrameGridOption | Bookmark | ButtonPreference | CellStyle | CellStyleGroup | ChapterNumberPreference | CharacterStyle | CharacterStyleGroup | CjkGridPreference | Color | CompositeFont | Condition | ConditionSet | ConditionalTextPreference | CrossReferenceFormat | CrossReferenceSource | DTD | DashedStrokeStyle | DataMerge | DataMergeImagePlaceholder | DataMergeOption | DataMergeTextPlaceholder | DictionaryPreference | DocumentEvent | DocumentPreference | DottedStrokeStyle | Event | EventListener | ExportForWebPreference | Font | FootnoteOption | FrameFittingOption | GalleyPreference | Gradient | GridPreference | GuidePreference | Hyperlink | HyperlinkExternalPageDestination | HyperlinkPageDestination | HyperlinkPageItemSource | HyperlinkTextDestination | HyperlinkTextSource | HyperlinkURLDestination | HyphenationException | ImportExportEvent | Index | IndexOptions | IndexingSortOption | Ink | KinsokuTable | Language | Layer | LayoutAdjustmentPreference | LayoutGridDataInformation | LayoutWindow | MarginPreference | MasterSpread | MetadataPreference | MixedInk | MixedInkGroup | MojikumiTable | MojikumiUiPreference | MotionPreset | MutationEvent | NamedGrid | NumberingList | ObjectStyle | ObjectStyleGroup | PageItemDefault | ParagraphDestination | ParagraphStyle | ParagraphStyleGroup | PasteboardPreference | PlaceGun | Preference | PreflightOption | PreflightProfile | PrintBookletOption | PrintBookletPrintPreference | PrintEvent | PrintPreference | Section | Spread | Story | StoryGridDataInformation | StoryPreference | StoryWindow | StripedStrokeStyle | StrokeStyle | Swatch | TOCStyle | TableStyle | TableStyleGroup | TextDefault | TextFramePreference | TextPreference | TextVariable | TextWrapPreference | Tint | TransparencyPreference | TrapPreset | ValidationError | ViewPreference | WatermarkPreference | Window | XMLComment | XMLElement | XMLExportMap | XMLExportPreference | XMLImportMap | XMLImportPreference | XMLInstruction | XMLItem | XMLPreference | XMLTag | XMLViewPreference | XmlStory

Properties

PropertyTypeAccessDescription
accurateLABSpotsbool r/wIf true, uses LAB alternates for spot colors when available.
activeLayerLayerString r/wThe active layer. Can also accept: String.
activeProcessPreflightProcess readonlyThe active preflight process for this document.
afterBlendingIntentRenderingIntent:
RenderingIntent.USE_COLOR_SETTINGS
RenderingIntent.PERCEPTUAL
RenderingIntent.SATURATION
RenderingIntent.RELATIVE_COLORIMETRIC
RenderingIntent.ABSOLUTE_COLORIMETRIC
r/wThe rendering intent for colors that result from transparency interactions on the page after blending.
allCellStylesArray of CellStyle readonlyAll Cell styles
allCharacterStylesArray of CharacterStyle readonlyLists all character styles (regardless of their group).
allGraphicsArray of Graphic readonlyLists all graphics contained by the Document.
allObjectStylesArray of ObjectStyle readonlyAll object styles contained by the Document.
allPageItemsArray of PageItem readonlyLists all page items contained by the Document.
allParagraphStylesArray of ParagraphStyle readonlyLists all paragraph styles (regardless of their group).
allTableStylesArray of TableStyle readonlyAll Table styles
anchoredObjectDefaultsAnchoredObjectDefault readonlyAnchored object default settings.
anchoredObjectSettingsAnchoredObjectSetting readonlyAnchored object settings.
assignmentsAssignments readonlyA collection of assignments.
associatedXMLElementXMLItem readonlyThe XML element associated with the Document.
baselineFrameGridOptionsBaselineFrameGridOption readonlyBaseline frame grid option settings.
bookmarksBookmarks readonlyA collection of bookmarks.
buttonPreferencesButtonPreference readonlyButton preference settings.
buttonsButtons readonlyA collection of buttons.
cellStyleGroupsCellStyleGroups readonlyA collection of cell style groups.
cellStylesCellStyles readonlyA collection of cell styles.
chapterNumberPreferencesChapterNumberPreference readonlyChapter numbering preferences.
characterStyleGroupsCharacterStyleGroups readonlyA collection of character style groups.
characterStylesCharacterStyles readonlyA collection of character styles.
cjkGridPreferencesCjkGridPreference readonlyCJK grid preference settings.
cmykPolicyColorSettingsPolicy:
ColorSettingsPolicy.COLOR_POLICY_OFF
ColorSettingsPolicy.PRESERVE_EMBEDDED_PROFILES
ColorSettingsPolicy.CONVERT_TO_WORKING_SPACE
ColorSettingsPolicy.COMBINATION_OF_PRESERVE_AND_SAFE_CMYK
r/wThe policy for handling colors in a CMYK color model, including reading and embedding color profiles, mismatches between embedded color profiles and the working space, and moving colors from one document to another.
cmykProfilestring r/wThe current CMYK profile.
cmykProfileListArray of string readonlyA list of valid CMYK profiles.
colorsColors readonlyA collection of colors.
compositeFontsCompositeFonts readonlyA collection of composite fonts.
conditionSetsConditionSets readonlyA collection of condition sets for conditional text.
conditionalTextPreferencesConditionalTextPreference readonlyConditional text preferences.
conditionsConditions readonlyA collection of conditions for conditional text.
convertedbool readonlyIf true, the Document was converted.
crossReferenceFormatsCrossReferenceFormats readonlyA collection of cross reference formats.
crossReferenceSourcesCrossReferenceSources readonlyA collection of cross reference text sources.
dashedStrokeStylesDashedStrokeStyles readonlyA collection of dashed stroke styles.
dataMergeImagePlaceholdersDataMergeImagePlaceholders readonlyA collection of data merge image placeholders.
dataMergeOptionsDataMergeOption readonlyThe data merge option properties that define the data merge.
dataMergePropertiesDataMerge readonlyData merge properties that define data merge fields and preferences.
dataMergeTextPlaceholdersDataMergeTextPlaceholders readonlyA collection of data merge text placeholders.
defaultImageIntentRenderingIntent:
RenderingIntent.USE_COLOR_SETTINGS
RenderingIntent.PERCEPTUAL
RenderingIntent.SATURATION
RenderingIntent.RELATIVE_COLORIMETRIC
RenderingIntent.ABSOLUTE_COLORIMETRIC
r/wThe rendering intent for bitmap images.
dictionaryPreferencesDictionaryPreference readonlyUser dictionary preference settings.
documentPreferencesDocumentPreference readonlyDocument preference settings.
dottedStrokeStylesDottedStrokeStyles readonlyA collection of dotted stroke styles.
dtdsDTDs readonlyA collection of DTDs.
editingStateEditingState:
EditingState.EDITING_UNKNOWN
EditingState.EDITING_NOWHERE
EditingState.EDITING_REMOTELY
EditingState.EDITING_LOCALLY
EditingState.EDITING_LOCALLY_LOCKED
EditingState.EDITING_CONFLICT
readonlyThe Version Cue editing state of the file.
epstextsEPSTexts readonlyEPSTexts
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
exportForWebPreferencesExportForWebPreference readonlyThe default export for web preferences.
filePathFile readonlyThe full path to the file.
fontsFonts readonlyA collection of fonts.
footnoteOptionsFootnoteOption readonlyFootnote option settings.
formFieldsFormFields readonlyA collection of form fields.
frameFittingOptionsFrameFittingOption readonlyThe frame fitting option to apply to placed or pasted content. Can be applied to a frame, object style, or document or to the application.
fullNameFile readonlyThe full path to the Document, including the name of the Document.
galleyPreferencesGalleyPreference readonlyGalley preference settings.
gradientsGradients readonlyA collection of gradients.
graphicLinesGraphicLines readonlyA collection of graphic lines.
gridPreferencesGridPreference readonlyGrid preference settings.
groupsGroups readonlyA collection of groups.
guidePreferencesGuidePreference readonlyGuide preference settings.
guidesGuides readonlyA collection of guides.
hyperlinkExternalPageDestinationsHyperlinkExternalPageDestinations readonlyA collection of hyperlink external page destinations.
hyperlinkPageDestinationsHyperlinkPageDestinations readonlyA collection of hyperlink page destinations.
hyperlinkPageItemSourcesHyperlinkPageItemSources readonlyA collection of hyperlink page item sources.
hyperlinkTextDestinationsHyperlinkTextDestinations readonlyA collection of hyperlink text destinations.
hyperlinkTextSourcesHyperlinkTextSources readonlyA collection of hyperlink text sources.
hyperlinkURLDestinationsHyperlinkURLDestinations readonlyA collection of hyperlink URL destinations.
hyperlinksHyperlinks readonlyA collection of hyperlinks.
hyphenationExceptionsHyphenationExceptions readonlyA collection of hyphenation exceptions lists.
idnumber readonlyThe unique ID of the Document.
indexnumber readonlyThe index of the Document within its containing object.
indexGenerationOptionsIndexOptions readonlyThe index options properties that define how an index is formatted.
indexesIndexes readonlyA collection of indexes.
indexingSortOptionsIndexingSortOptions readonlyA collection of indexing sort options.
inksInks readonlyA collection of inks.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
kinsokuTablesKinsokuTables readonlyA collection of kinsoku tables.
labelstring r/wA property that can be set to any string.
languagesLanguages readonlyA collection of languages.
layersLayers readonlyA collection of layers.
layoutAdjustmentPreferencesLayoutAdjustmentPreference readonlyLayout sdjustment preference settings.
layoutGridDataLayoutGridDataInformation readonlyDefault properties specific to layout grids.
layoutWindowsLayoutWindows readonlyA collection of layout windows.
linksLinks readonlyA collection of links.
marginPreferencesMarginPreference readonlyMargin preference settings.
masterSpreadsMasterSpreads readonlyA collection of master spreads.
metadataPreferencesMetadataPreference readonlyMetadata preference settings.
mixedInkGroupsMixedInkGroups readonlyA collection of mixed ink groups.
mixedInksMixedInks readonlyA collection of mixed inks.
modifiedbool readonlyIf true, the Document has been modified since it was last saved.
mojikumiTablesMojikumiTables readonlyA collection of mojikumi tables.
mojikumiUIPreferencesMojikumiUiPreference readonlyMojikumi user interface preference settings.
motionPresetsMotionPresets readonlyA collection of Motion presets.
multiStateObjectsMultiStateObjects readonlyA collection of multi-state objects.
namestring readonlyThe name of the Document.
namedGridsNamedGrids readonlyA collection of named grids.
numberingListsNumberingLists readonlyA collection of numbered lists.
objectStyleGroupsObjectStyleGroups readonlyA collection of object style groups.
objectStylesObjectStyles readonlyA collection of object styles.
ovalsOvals readonlyA collection of ellipses.
pageItemDefaultsPageItemDefault readonlyThe default page item formatting for the Document.
pageItemsPageItems readonlyThe page items collection, which can be used to process all page items in a container (such as a document, page, or group), regardless of type.
pagesPages readonlyA collection of pages.
paragraphDestinationsParagraphDestinations readonlyA collection of paragraph destinations.
paragraphStyleGroupsParagraphStyleGroups readonlyA collection of paragraph style groups.
paragraphStylesParagraphStyles readonlyA collection of paragraph styles.
parentApplication readonlyThe parent of the Document (a Application).
pasteboardPreferencesPasteboardPreference readonlyPasteboard preference settings.
placeGunsPlaceGun readonlyThe place gun.
polygonsPolygons readonlyA collection of polygons.
preferencesPreferences readonlyA collection of preferences objects.
preflightOptionsPreflightOption readonlyPreflight option settings.
preflightProfilesPreflightProfiles readonlyA collection of preflight profiles.
printBookletOptionsPrintBookletOption readonlyBooklet printing options.
printBookletPrintPreferencesPrintBookletPrintPreference readonlyPrint booklet preferences.
printPreferencesPrintPreference readonlyPrint preference settings.
propertiesObject r/wA property that allows setting of several properties at the same time.
readOnlybool readonlyIf true, the Document is read-only.
recoveredbool readonlyIf true, the Document was recovered.
rectanglesRectangles readonlyA collection of rectangles.
redoHistoryArray of string readonlyThe names of the items in the redo stack.
redoNamestring readonlyThe name of the action on the top of the redo stack.
rgbPolicyColorSettingsPolicy:
ColorSettingsPolicy.COLOR_POLICY_OFF
ColorSettingsPolicy.PRESERVE_EMBEDDED_PROFILES
ColorSettingsPolicy.CONVERT_TO_WORKING_SPACE
ColorSettingsPolicy.COMBINATION_OF_PRESERVE_AND_SAFE_CMYK
r/wThe policy for handling colors in an RGB color model, including reading and embedding color profiles, handling mismatches between embedded color profiles and the working space, and moving colors from one document to another.
rgbProfilestring r/wThe current RGB profile.
rgbProfileListArray of string readonlyA list of valid RGB profiles.
savedbool readonlyIf true, the Document has been saved since it was created.
sectionsSections readonlyA collection of sections.
selectionArray of NothingEnum
Object
Object
r/wThe selected object(s). Can also accept: Object or NothingEnum enumerator.
solidColorIntentRenderingIntent:
RenderingIntent.USE_COLOR_SETTINGS
RenderingIntent.PERCEPTUAL
RenderingIntent.SATURATION
RenderingIntent.RELATIVE_COLORIMETRIC
RenderingIntent.ABSOLUTE_COLORIMETRIC
r/wThe rendering intent for all vector art (areas of solid color) in native objects.
splineItemsSplineItems readonlyThe spline items collection.
spreadsSpreads readonlyA collection of spreads.
storiesStories readonlyA collection of stories.
storyGridDataStoryGridDataInformation readonlyDefault properties specific to frame grids.
storyPreferencesStoryPreference readonlyStory preference settings.
storyWindowsStoryWindows readonlyA collection of story windows.
stripedStrokeStylesStripedStrokeStyles readonlyA collection of striped stroke styles.
strokeStylesStrokeStyles readonlyA collection of stroke styles.
swatchesSwatches readonlyA collection of swatches.
tableStyleGroupsTableStyleGroups readonlyA collection of table style groups.
tableStylesTableStyles readonlyA collection of table styles.
textDefaultsTextDefault readonlyText default settings.
textFramePreferencesTextFramePreference readonlyText frame preference settings.
textFramesTextFrames readonlyA collection of text frames.
textPreferencesTextPreference readonlyText preference settings.
textVariablesTextVariables readonlyA collection of text variables.
textWrapPreferencesTextWrapPreference readonlyThe text wrap preference properties that define the default formatting for wrapping text around objects.
tintsTints readonlyA collection of tints.
tocStylesTOCStyles readonlyA collection of TOC styles.
transparencyPreferencesTransparencyPreference readonlyTransparency preference settings.
trapPresetsTrapPresets readonlyA collection of trap presets.
undoHistoryArray of string readonlyThe names of the items in the undo stack.
undoNamestring readonlyThe name of the action on the top of the undo stack.
unusedSwatchesArray of Swatch readonlyThe swatches that are not being used.
validationErrorsValidationErrors readonlyA collection of XML validation errors.
versionStateVersionState:
VersionState.VERSION_UNKNOWN
VersionState.PROJECT_FILE_NEWER
VersionState.LOCAL_PROJECT_MATCH
VersionState.LOCAL_NEWER
VersionState.VERSION_CONFLICT
VersionState.NO_RESOURCE
readonlyThe Version Cue version state of the file.
viewPreferencesViewPreference readonlyView preference settings.
visiblebool readonlyIf true, the Document is visible.
watermarkPreferencesWatermarkPreference readonlyWatermark preferences
windowsWindows readonlyA collection of windows.
xmlCommentsXMLComments readonlyA collection of XML comments.
xmlElementsXMLElements readonlyA collection of XML elements.
xmlExportMapsXMLExportMaps readonlyA collection of XML export maps.
xmlExportPreferencesXMLExportPreference readonlyXML export preference settings.
xmlImportMapsXMLImportMaps readonlyA collection of XML import maps.
xmlImportPreferencesXMLImportPreference readonlyXML import preference settings.
xmlInstructionsXMLInstructions readonlyA collection of XML instructions.
xmlItemsXMLItems readonlyA collection of XML items.
xmlPreferencesXMLPreference readonlyThe XML preference settings.
xmlStoriesXmlStories readonlyA collection of xml stories.
xmlTagsXMLTags readonlyA collection of XML tags.
xmlViewPreferencesXMLViewPreference readonlyXML view preference settings.
zeroPointArray of Measurement Unit (Number or String) r/wThe ruler origin, specified as page coordinates in the format [x, y].

Class

PropertyTypeAccessDescription
AFTER_ACTIVATEstring readonlyDispatched after the Document becomes active. This event bubbles. This event is not cancelable. (default: afterActivate)
AFTER_EXPORTstring readonlyDispatched after a Document is exported. This event bubbles. This event is not cancelable. (default: afterExport)
AFTER_IMPORTstring readonlyDispatched after importing a file into a Document. This event bubbles. This event is not cancelable. (default: afterImport)
AFTER_LINKS_CHANGEDstring readonlyDispatched after one or more links in the Document have been added, deleted, or modified. This event bubbles. This event is not cancelable. (default: afterLinksChanged)
AFTER_NEWstring readonlyDispatched after a Document is created. This event bubbles. This event is not cancelable. (default: afterNew)
AFTER_OPENstring readonlyDispatched after a Document is opened. This event bubbles. This event is not cancelable. (default: afterOpen)
AFTER_PRINTstring readonlyDispatched after a Document is printed. This event bubbles. This event is not cancelable. (default: afterPrint)
AFTER_REVERTstring readonlyDispatched after a Document is reverted. This event bubbles. This event is not cancelable. (default: afterRevert)
AFTER_SAVEstring readonlyDispatched after a Document is saved. This event bubbles. This event is not cancelable. (default: afterSave)
AFTER_SAVE_ASstring readonlyDispatched after a Document is saved under a new name. This event bubbles. This event is not cancelable. (default: afterSaveAs)
AFTER_SAVE_A_COPYstring readonlyDispatched after a copy of a Document is saved. This event bubbles. This event is not cancelable. (default: afterSaveACopy)
BEFORE_CLOSEstring readonlyDispatched before a Document is closed. This event bubbles. This event is not cancelable. (default: beforeClose)
BEFORE_DEACTIVATEstring readonlyDispatched before the Document becomes inactive. This event bubbles. This event is not cancelable. (default: beforeDeactivate)
BEFORE_EXPORTstring readonlyDispatched before a Document is exported. This event bubbles. This event is cancelable. (default: beforeExport)
BEFORE_IMPORTstring readonlyDispatched before importing a file into a Document. This event bubbles. This event is cancelable. (default: beforeImport)
BEFORE_PRINTstring readonlyDispatched before a Document is printed. This event bubbles. This event is cancelable. (default: beforePrint)
BEFORE_REVERTstring readonlyDispatched before a Document is reverted. This event bubbles. This event is cancelable. (default: beforeRevert)
BEFORE_SAVEstring readonlyDispatched before a Document is saved. This event bubbles. This event is cancelable. (default: beforeSave)
BEFORE_SAVE_ASstring readonlyDispatched before a Document is saved under a new name. This event bubbles. This event is cancelable. (default: beforeSaveAs)
BEFORE_SAVE_A_COPYstring readonlyDispatched before a copy of a Document is saved. This event bubbles. This event is cancelable. (default: beforeSaveACopy)
FAILED_EXPORTstring readonlyDispatched after a Document export is canceled or fails. This event bubbles. This event is not cancelable. (default: failedExport)

Methods

Instances

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

void align (alignDistributeItems: Array of PageItem, alignOption: AlignOptions[, alignDistributeBounds: AlignDistributeBounds])
Align page items.

ParameterTypeDescription
alignDistributeItemsArray of PageItemThe page items to align or distribute.
alignOptionAlignOptions:
AlignOptions.LEFT_EDGES
AlignOptions.TOP_EDGES
AlignOptions.RIGHT_EDGES
AlignOptions.BOTTOM_EDGES
AlignOptions.HORIZONTAL_CENTERS
AlignOptions.VERTICAL_CENTERS
The type of alignment to apply.
alignDistributeBoundsAlignDistributeBounds:
AlignDistributeBounds.ITEM_BOUNDS
AlignDistributeBounds.PAGE_BOUNDS
AlignDistributeBounds.MARGIN_BOUNDS
AlignDistributeBounds.SPREAD_BOUNDS
The bounds within which to align or distribute the page items. (Optional)

BackgroundTask asynchronousExportFile (format: varies, to: File[, showingOptions: bool=false][, using: PDFExportPreset][, versionComments: string][, forceSave: bool=false])
asynchronously exports the object(s) to a file.

ParameterTypeDescription
formatExportFormat
String
The export format, specified as an enumeration value or as an extension that appears in the Save as type or Format menu in the Export dialog. Can accept: ExportFormat enumerator or String.
toFileThe path to the export file.
showingOptionsboolIf true, displays the export options dialog. (Optional) (default: false)
usingPDFExportPresetThe export style. (Optional)
versionCommentsstringThe comment for this version. (Optional)
forceSaveboolIf true, forcibly saves a version. (Optional) (default: false)

void changeComposer ()
Change comoser to optyca

Array of Text changeGlyph ([reverseOrder: bool])
Finds glyphs that match the find what value and replaces the glyphs with the change to value.

ParameterTypeDescription
reverseOrderboolIf true, returns the results in reverse order. (Optional)

Array of Text changeGrep ([reverseOrder: bool])
Finds text that matches the find what value and replaces the text with the change to value.

ParameterTypeDescription
reverseOrderboolIf true, returns the results in reverse order. (Optional)

Array of PageItem changeObject ([reverseOrder: bool])
Finds objects that match the find what value and replace the objects with the change to value.

ParameterTypeDescription
reverseOrderboolIf true, returns the results in reverse order. (Optional)

Array of Text changeText ([reverseOrder: bool])
Finds text that matches the find what value and replaces the text with the change to value.

ParameterTypeDescription
reverseOrderboolIf true, returns the results in reverse order. (Optional)

Array of Text changeTransliterate ([reverseOrder: bool])
Finds text that matches the find character type value and replaces the text with the change character type value.

ParameterTypeDescription
reverseOrderboolIf true, returns the results in reverse order. (Optional)

void checkIn ([versionComments: string][, forceSave: bool=false])
Check in to Version Cue.

ParameterTypeDescription
versionCommentsstringThe comment for this version (Optional)
forceSaveboolForcibly save a version (Optional) (default: false)

void clearFrameFittingOptions ()
Removes the frame fittings options and resets it to the initial state.

void close ([saving: SaveOptions=SaveOptions.ASK][, savingIn: File][, versionComments: string][, forceSave: bool=false])
Close the Document

ParameterTypeDescription
savingSaveOptions:
SaveOptions.NO
SaveOptions.ASK
SaveOptions.YES
Whether to save changes before closing the Document (Optional) (default: SaveOptions.ASK)
savingInFileThe file in which to save the Document (Optional)
versionCommentsstringThe comment for this version (Optional)
forceSaveboolForcibly save a version (Optional) (default: false)

Array of Story createTOC (using: TOCStyle[, replacing: bool=false][, fromBook: Book][, placePoint: Array of Measurement Unit (Number or String)][, includeOverset: bool=false][, destinationLayer: Layer])
Creates a table of contents.

ParameterTypeDescription
usingTOCStyleThe TOC style to use to define the content, title, and format of the table of contents.
replacingboolIf true, replaces the existing TOC. (Optional) (default: false)
fromBookBookThe book whose documents to include in the TOC. (Optional)
placePointArray of Measurement Unit (Number or String)The point at which to place the TOC story, specified as page coordinates in the format [x, y]. (Optional)
includeOversetboolIf true, includes overset text TOC entries in the TOC. (Optional) (default: false)
destinationLayerLayerThe layer on which to place the TOC. (Optional)

void deleteUnusedTags ()
Deletes unused XML markup tags.

void distribute (alignDistributeItems: Array of PageItem, distributeOption: DistributeOptions[, alignDistributeBounds: AlignDistributeBounds][, useDistributeMeasurement: bool][, absoluteDistributeMeasurement: Measurement Unit (Number or String)])
Distribute page items.

ParameterTypeDescription
alignDistributeItemsArray of PageItemThe page items to align or distribute
distributeOptionDistributeOptions:
DistributeOptions.LEFT_EDGES
DistributeOptions.TOP_EDGES
DistributeOptions.RIGHT_EDGES
DistributeOptions.BOTTOM_EDGES
DistributeOptions.HORIZONTAL_CENTERS
DistributeOptions.VERTICAL_CENTERS
DistributeOptions.HORIZONTAL_SPACE
DistributeOptions.VERTICAL_SPACE
The type of distribution to apply.
alignDistributeBoundsAlignDistributeBounds:
AlignDistributeBounds.ITEM_BOUNDS
AlignDistributeBounds.PAGE_BOUNDS
AlignDistributeBounds.MARGIN_BOUNDS
AlignDistributeBounds.SPREAD_BOUNDS
The bounds within which to align or distribute the page items. (Optional)
useDistributeMeasurementboolIf true, distribute space between page items. When this property is true, the bounds setting is ignored. (Optional)
absoluteDistributeMeasurementMeasurement Unit (Number or String)The distance to use when distributing page items. (Optional)

PreflightProfile embed (using: varies)
Embed this profile to the document.

ParameterTypeDescription
usingPreflightProfile
String
The preflight profile to embed. Can accept: String or PreflightProfile.

void exportFile (format: varies, to: File[, showingOptions: bool=false][, using: PDFExportPreset][, versionComments: string][, forceSave: bool=false])
Exports the object(s) to a file.

ParameterTypeDescription
formatExportFormat
String
The export format, specified as an enumeration value or as an extension that appears in the Save as type or Format menu in the Export dialog. Can accept: ExportFormat enumerator or String.
toFileThe path to the export file.
showingOptionsboolIf true, displays the export options dialog. (Optional) (default: false)
usingPDFExportPresetThe export style. (Optional)
versionCommentsstringThe comment for this version. (Optional)
forceSaveboolIf true, forcibly saves a version. (Optional) (default: false)

void exportStrokeStyles (to: File, strokeStyleList: Array of StrokeStyle[, versionComments: string][, forceSave: bool=false])
Exports stroke styles or presets.

ParameterTypeDescription
toFileThe file to save to
strokeStyleListArray of StrokeStyleThe list of stroke styles to save
versionCommentsstringThe comment for this version (Optional)
forceSaveboolForcibly save a version (Optional) (default: false)

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

Array of Text findGlyph ([reverseOrder: bool])
Finds glyphs that match the find what value.

ParameterTypeDescription
reverseOrderboolIf true, returns the results in reverse order. (Optional)

Array of Text findGrep ([reverseOrder: bool])
Finds text that matches the find what value.

ParameterTypeDescription
reverseOrderboolIf true, returns the results in reverse order. (Optional)

Array of PageItem findObject ([reverseOrder: bool])
Finds objects that match the find what value.

ParameterTypeDescription
reverseOrderboolIf true, returns the results in reverse order. (Optional)

Array of Text findText ([reverseOrder: bool])
Finds text that matches the find what value.

ParameterTypeDescription
reverseOrderboolIf true, returns the results in reverse order. (Optional)

Array of Text findTransliterate ([reverseOrder: bool])
Finds text that matches the find character type value.

ParameterTypeDescription
reverseOrderboolIf true, returns the results in reverse order. (Optional)

Array of Document getElements ()
Resolves the object specifier, creating an array of object references.

Color importAdobeSwatchbookProcessColor (name: string)
Imports a process color swatch from a preloaded Adobe color book.

ParameterTypeDescription
namestringThe process color to load.

Color importAdobeSwatchbookSpotColor (name: string)
Imports a spot color swatch from an Adobe color book.

ParameterTypeDescription
namestringThe spot color to load.

void importDtd (from: File)
Imports a DTD to use for validation.

ParameterTypeDescription
fromFileThe path to the DTD file.

void importFormats (from: File)
Imports the cross reference formats from specified file.

ParameterTypeDescription
fromFileThe file whose formats to import.

void importStyles (format: ImportFormat, from: File[, globalStrategy: GlobalClashResolutionStrategy=GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE])
Imports the specified styles.

ParameterTypeDescription
formatImportFormat:
ImportFormat.CHARACTER_STYLES_FORMAT
ImportFormat.PARAGRAPH_STYLES_FORMAT
ImportFormat.TEXT_STYLES_FORMAT
ImportFormat.TOC_STYLES_FORMAT
ImportFormat.OBJECT_STYLES_FORMAT
ImportFormat.STROKE_STYLES_FORMAT
ImportFormat.TABLE_STYLES_FORMAT
ImportFormat.CELL_STYLES_FORMAT
ImportFormat.TABLE_AND_CELL_STYLES_FORMAT
The types of styles to import.
fromFileThe file containing the styles you want to import.
globalStrategyGlobalClashResolutionStrategy:
GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE
GlobalClashResolutionStrategy.LOAD_ALL_WITH_RENAME
GlobalClashResolutionStrategy.DO_NOT_LOAD_THE_STYLE
The resolution strategy to employ for imported styles that have the same names as existing styles. (Optional) (default: GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE)

void importXML (from: File)
Imports the specified XML file into an InDesign document.

ParameterTypeDescription
fromFileThe XML file.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void loadConditions (from: File[, loadConditionSets: bool])
Load conditions from the specified file.

ParameterTypeDescription
fromFileThe path to the file that contains the conditions.
loadConditionSetsboolIf true, load the condition sets as well. (Optional)

void loadMasters (from: File[, globalStrategyForMasterPage: GlobalClashResolutionStrategyForMasterPage=GlobalClashResolutionStrategyForMasterPage.LOAD_ALL_WITH_OVERWRITE])
Load masterpages from an InDesign file.

ParameterTypeDescription
fromFileThe InDesign file to load the masters from.
globalStrategyForMasterPageGlobalClashResolutionStrategyForMasterPage:
GlobalClashResolutionStrategyForMasterPage.LOAD_ALL_WITH_OVERWRITE
GlobalClashResolutionStrategyForMasterPage.LOAD_ALL_WITH_RENAME
the global clash resolution strategy for load master page (Optional) (default: GlobalClashResolutionStrategyForMasterPage.LOAD_ALL_WITH_OVERWRITE)

void loadSwatches (from: File)
Load swatches from the specified file.

ParameterTypeDescription
fromFileThe swatch file or InDesign document.

void loadXMLTags (from: File)
Loads a set of XML markup tags from the specified file.

ParameterTypeDescription
fromFileThe path to the file that contains the tags.

void mapStylesToXMLTags ()
Auto tag the document based on the style to tag mappings

void mapXMLTagsToStyles ()
Auto style the document based on the tag to style mappings

bool packageForPrint (to: File, copyingFonts: bool, copyingLinkedGraphics: bool, copyingProfiles: bool, updatingGraphics: bool, includingHiddenLayers: bool, ignorePreflightErrors: bool, creatingReport: bool[, versionComments: string][, forceSave: bool=false])
Packages the document.

ParameterTypeDescription
toFileThe folder, alias, or path in which to place the packaged files.
copyingFontsboolIf true, copies fonts used in the document to the package folder.
copyingLinkedGraphicsboolIf true, copies linked graphics files to the package folder.
copyingProfilesboolIf true, copies color profiles to the package folder.
updatingGraphicsboolIf true, updates graphics links to the package folder.
includingHiddenLayersboolIf true, copies fonts and links from hidden layers to the package.
ignorePreflightErrorsboolIf true, ignores preflight errors and proceeds with the packaging. If false, cancels the packaging when errors exist.
creatingReportboolIf true, creates a package report that includes printing instructions, print settings, lists of fonts, links and required inks, and other information.
versionCommentsstringThe comments for the version. (Optional)
forceSaveboolIf true, forcibly saves a version. (Optional) (default: false)

void place (fileName: varies[, showingOptions: bool=false][, withProperties: Object])
Place one or more files following the behavior of the place menu item. This may load the place gun or replace the selected object, depending on current preferences.

ParameterTypeDescription
fileNameArray of Files
File
One or more files to place. Can accept: File or Array of Files.
showingOptionsboolWhether to display the import options dialog (Optional) (default: false)
withPropertiesObjectInitial values for properties of the placed object(s) (Optional)

void print ([printDialog: bool][, using: varies])
Prints the Document(s).

ParameterTypeDescription
printDialogboolWhether to invoke the print dialog (Optional)
usingPrinterPreset
PrinterPresetTypes
Printer preset to use. Can accept: PrinterPresetTypes enumerator or PrinterPreset. (Optional)

void printBooklet ([printBookletDialog: bool=false][, using: varies])
Print the Booklet using current document and Booklet and Print settings in the document

ParameterTypeDescription
printBookletDialogboolWhether to invoke the print booklet dialog (Optional) (default: false)
usingPrinterPreset
PrinterPresetTypes
Printer preset to use. Can accept: PrinterPresetTypes enumerator or PrinterPreset. (Optional)

void recompose ()
Recomposes the text in the Document.

void redo ()
Redoes the last action.

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

void resetAllButtons ()
Resets all the buttons to their Normal state.

void resetAllMultiStateObjects ()
Resets all the multi-state objects to their first state.

bool revert ()
Reverts the document to its state at the last save operation.

void revertToProject ([forceRevert: bool=false])
Reverts to the version of the document in Version Cue.

ParameterTypeDescription
forceRevertboolForcibly reverts to the project version. (Optional) (default: false)

Document save ([to: File][, stationery: bool=false][, versionComments: string][, forceSave: bool=false])
Save the document

ParameterTypeDescription
toFileWhere to save the document. If the document is already saved, a copy is saved at this path, the original file is closed the new copy is opened (Optional)
stationeryboolWhether to save the file as stationery (Optional) (default: false)
versionCommentsstringThe comment for this version (Optional)
forceSaveboolForcibly save a version (Optional) (default: false)

void saveACopy ([to: File][, stationery: bool=false])
Saves a copy of the document.

ParameterTypeDescription
toFileThe file path for the copy. Note: Leaves the original document open and does not open the copy. (Optional)
stationeryboolIf true, saves the file as stationery (Mac OS) or as a template (Windows). Note: The file extension for stationery and templates is different than the extension for regular files. (Optional) (default: false)

void saveSwatches (to: File, swatchList: Array of Swatch[, versionComments: string][, forceSave: bool=false])
Saves the specified swatch(es) to a swatchbook file.

ParameterTypeDescription
toFileThe swatchbook file to save to.
swatchListArray of SwatchThe swatch(es) to save.
versionCommentsstringThe comment for this version. (Optional)
forceSaveboolIf true, forcibly saves a version. (Optional) (default: false)

void saveXMLTags (to: File[, versionComments: string][, forceSave: bool=false])
Saves a set of tags to an external file.

ParameterTypeDescription
toFileThe full path to the file in which to save the tags.
versionCommentsstringThe comment for this version. (Optional)
forceSaveboolIf true, forcibly saves a version. (Optional) (default: false)

void select (selectableItems: varies[, existingSelection: SelectionOptions=SelectionOptions.REPLACE_WITH])
Selects the specified object(s).

ParameterTypeDescription
selectableItemsArray of Objects
NothingEnum
Object
SelectAll
The objects to select. Can accept: Object, Array of Objects, NothingEnum enumerator or SelectAll enumerator.
existingSelectionSelectionOptions:
SelectionOptions.ADD_TO
SelectionOptions.REMOVE_FROM
SelectionOptions.REPLACE_WITH
The selection status of the Document in relation to previously selected objects. (Optional) (default: SelectionOptions.REPLACE_WITH)

VersionCueSyncStatus synchronizeWithVersionCue ([syncConflictResolution: SyncConflictResolution=SyncConflictResolution.SKIP_CONFLICTS][, versionComments: string])
Synchronizes the file with the Version Cue project.

ParameterTypeDescription
syncConflictResolutionSyncConflictResolution:
SyncConflictResolution.SKIP_CONFLICTS
SyncConflictResolution.ASK_ABOUT_CONFLICTS
SyncConflictResolution.PREFER_LOCAL
SyncConflictResolution.PREFER_PROJECT
The conflict resolution method to use during synchronization. (Optional) (default: SyncConflictResolution.SKIP_CONFLICTS)
versionCommentsstringThe comments that describe the version. (Optional)

string toSource ()
Generates a string which, if executed, will return the Document.

string toSpecifier ()
Retrieves the object specifier.

void undo ()
Undoes the last action.

void updateCrossReferences ()
Updates cross references' text source content in the document.

Element of

AnchoredObjectDefault.parent

Application.activeDocument

Assignment.parent

Book.styleSourceDocument

Bookmark.parent

ButtonPreference.parent

ChapterNumberPreference.parent

CjkGridPreference.parent

Color.parent

CompositeFont.parent

Condition.parent

ConditionSet.parent

ConditionalTextPreference.parent

CrossReferenceFormat.parent

CrossReferenceSource.parent

DTD.parent

DashedStrokeStyle.parent

DataMerge.parent

DataMergeImagePlaceholder.parent

DataMergeOption.parent

DataMergeTextPlaceholder.parent

DictionaryPreference.parent

DocumentEvent.parent

DocumentPreference.parent

DottedStrokeStyle.parent

ExportForWebPreference.parent

Font.parent

FootnoteOption.parent

FrameFittingOption.parent

GalleyPreference.parent

Gradient.parent

GridPreference.parent

GuidePreference.parent

Hyperlink.parent

HyperlinkExternalPageDestination.parent

HyperlinkPageDestination.parent

HyperlinkPageItemSource.parent

HyperlinkTextDestination.parent

HyperlinkTextSource.parent

HyperlinkURLDestination.parent

HyphenationException.parent

ImportExportEvent.parent

Index.parent

IndexOptions.parent

IndexingSortOption.parent

Ink.parent

KinsokuTable.parent

Language.parent

Layer.parent

LayoutAdjustmentPreference.parent

LayoutGridDataInformation.parent

LayoutWindow.parent

MarginPreference.parent

MasterSpread.parent

MetadataPreference.parent

MixedInk.parent

MixedInkGroup.parent

MojikumiTable.parent

MojikumiUiPreference.parent

MotionPreset.parent

NamedGrid.parent

NumberingList.parent

PageItemDefault.parent

ParagraphDestination.parent

PasteboardPreference.parent

PlaceGun.parent

PreflightOption.parent

PreflightProcess.targetObject

PreflightProfile.parent

PrintBookletOption.parent

PrintBookletPrintPreference.parent

PrintEvent.parent

PrintPreference.parent

Section.parent

Spread.parent

Story.parent

StoryGridDataInformation.parent

StoryWindow.parent

StripedStrokeStyle.parent

StrokeStyle.parent

Swatch.parent

TOCStyle.parent

TextDefault.parent

TextPreference.parent

TextVariable.parent

TextWrapPreference.parent

Tint.parent

TransparencyPreference.parent

TrapPreset.parent

ValidationError.parent

ViewPreference.parent

WatermarkPreference.parent

Window.parent

XMLComment.parent

XMLElement.parent

XMLExportMap.parent

XMLExportPreference.parent

XMLImportMap.parent

XMLImportPreference.parent

XMLInstruction.parent

XMLItem.parent

XMLPreference.parent

XMLTag.parent

XMLViewPreference.parent

XmlStory.parent

Used in:

Document Documents.nextItem (obj: Document)

Document Documents.previousItem (obj: Document)

PreflightProcess PreflightProcesses.add (targetObject: Document, appliedProfile: PreflightProfile[, preflightOptions: PreflightOption][, withProperties: Object])

Return

Array of Document Document.getElements ()

Document Document.save ([to: File][, stationery: bool=false][, versionComments: string][, forceSave: bool=false])

Document Documents.[] (index: number)

Document Documents.add ([showingWindow: bool=true][, documentPreset: DocumentPreset][, withProperties: Object])

Document Documents.anyItem ()

Array of Document Documents.everyItem ()

Document Documents.firstItem ()

Document Documents.item (index: varies)

Document Documents.itemByID (id: number)

Document Documents.itemByName (name: string)

Array of Document Documents.itemByRange (from: varies, to: varies)

Document Documents.lastItem ()

Document Documents.middleItem ()

Document Documents.nextItem (obj: Document)

Document Documents.previousItem (obj: Document)

Jongware, 20-Jun-2010 v3.0.3dContents :: Index