Adobe InDesign CS5.5 Server (7.5) Object Model JS: Document

InDesign Server CS5.5

Class

Document

 A document.

QuickLinks

addEventListener, align, 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, placeAndLink, print, printBooklet, recompose, removeEventListener, resetAllButtons, resetAllMultiStateObjects, revert, revertToProject, save, saveACopy, saveSwatches, saveXMLTags, synchronizeWithVersionCue, toSource, toSpecifier, updateCrossReferences

Hierarchy

Application
Document
AnchoredObjectDefault | AnchoredObjectSetting | Article | 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 | EPubExportPreference | Event | EventListener | ExportForWebPreference | Font | FootnoteOption | FrameFittingOption | Gradient | GridPreference | GuidePreference | HTMLExportPreference | Hyperlink | HyperlinkExternalPageDestination | HyperlinkPageDestination | HyperlinkPageItemSource | HyperlinkTextDestination | HyperlinkTextSource | HyperlinkURLDestination | HyphenationException | ImportExportEvent | Index | IndexOptions | IndexingSortOption | Ink | KinsokuTable | Language | Layer | LayoutAdjustmentPreference | LayoutGridDataInformation | LinkedStoryOption | 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 | StripedStrokeStyle | StrokeStyle | Swatch | TOCStyle | TableStyle | TableStyleGroup | TaggedPDFPreference | TextDefault | TextFramePreference | TextPreference | TextVariable | TextWrapPreference | Tint | TransparencyPreference | TrapPreset | ValidationError | ViewPreference | WatermarkPreference | XMLComment | XMLElement | XMLExportMap | XMLExportPreference | XMLImportMap | XMLImportPreference | XMLInstruction | XMLItem | XMLPreference | XMLTag | 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.
articlesArticles Article readonlyA collection of articles.
assignmentsAssignments Assignment readonlyA collection of assignments.
associatedXMLElementXMLItem readonlyThe XML element associated with the Document.
baselineFrameGridOptionsBaselineFrameGridOption readonlyBaseline frame grid option settings.
bookmarksBookmarks Bookmark readonlyA collection of bookmarks.
buttonPreferencesButtonPreference readonlyButton preference settings.
buttonsButtons Button readonlyA collection of buttons.
cellStyleGroupsCellStyleGroups CellStyleGroup readonlyA collection of cell style groups.
cellStylesCellStyles CellStyle readonlyA collection of cell styles.
chapterNumberPreferencesChapterNumberPreference readonlyChapter numbering preferences.
characterStyleGroupsCharacterStyleGroups CharacterStyleGroup readonlyA collection of character style groups.
characterStylesCharacterStyles CharacterStyle 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 Color readonlyA collection of colors.
compositeFontsCompositeFonts CompositeFont readonlyA collection of composite fonts.
conditionSetsConditionSets ConditionSet readonlyA collection of condition sets for conditional text.
conditionalTextPreferencesConditionalTextPreference readonlyConditional text preferences.
conditionsConditions Condition readonlyA collection of conditions for conditional text.
convertedbool readonlyIf true, the Document was converted.
crossReferenceFormatsCrossReferenceFormats CrossReferenceFormat readonlyA collection of cross reference formats.
crossReferenceSourcesCrossReferenceSources CrossReferenceSource readonlyA collection of cross reference text sources.
dashedStrokeStylesDashedStrokeStyles DashedStrokeStyle readonlyA collection of dashed stroke styles.
dataMergeImagePlaceholdersDataMergeImagePlaceholders DataMergeImagePlaceholder 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 DataMergeTextPlaceholder 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 DottedStrokeStyle readonlyA collection of dotted stroke styles.
dtdsDTDs DTD 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 EPSText readonlyEPSTexts
epubExportPreferencesEPubExportPreference readonlyEPub export preference settings.
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
exportForWebPreferencesExportForWebPreference readonlyThe default export for web preferences.
filePathFile readonlyThe full path to the file.
fontsFonts Font readonlyA collection of fonts.
footnoteOptionsFootnoteOption readonlyFootnote option settings.
formFieldsFormFields FormField 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.
gradientsGradients Gradient readonlyA collection of gradients.
graphicLinesGraphicLines GraphicLine readonlyA collection of graphic lines.
gridPreferencesGridPreference readonlyGrid preference settings.
groupsGroups Group readonlyA collection of groups.
guidePreferencesGuidePreference readonlyGuide preference settings.
guidesGuides Guide readonlyA collection of guides.
htmlExportPreferencesHTMLExportPreference readonlyHTML export preference settings.
hyperlinkExternalPageDestinationsHyperlinkExternalPageDestinations HyperlinkExternalPageDestination readonlyA collection of hyperlink external page destinations.
hyperlinkPageDestinationsHyperlinkPageDestinations HyperlinkPageDestination readonlyA collection of hyperlink page destinations.
hyperlinkPageItemSourcesHyperlinkPageItemSources HyperlinkPageItemSource readonlyA collection of hyperlink page item sources.
hyperlinkTextDestinationsHyperlinkTextDestinations HyperlinkTextDestination readonlyA collection of hyperlink text destinations.
hyperlinkTextSourcesHyperlinkTextSources HyperlinkTextSource readonlyA collection of hyperlink text sources.
hyperlinkURLDestinationsHyperlinkURLDestinations HyperlinkURLDestination readonlyA collection of hyperlink URL destinations.
hyperlinksHyperlinks Hyperlink readonlyA collection of hyperlinks.
hyphenationExceptionsHyphenationExceptions HyphenationException 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 IndexingSortOption readonlyA collection of indexing sort options.
inksInks Ink readonlyA collection of inks.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
kinsokuTablesKinsokuTables KinsokuTable readonlyA collection of kinsoku tables.
labelstring r/wA property that can be set to any string.
languagesLanguages Language readonlyA collection of languages.
layersLayers Layer readonlyA collection of layers.
layoutAdjustmentPreferencesLayoutAdjustmentPreference readonlyLayout sdjustment preference settings.
layoutGridDataLayoutGridDataInformation readonlyDefault properties specific to layout grids.
linkedStoryOptionsLinkedStoryOption readonlyLinked story options
linksLinks Link readonlyA collection of links.
marginPreferencesMarginPreference readonlyMargin preference settings.
masterSpreadsMasterSpreads MasterSpread readonlyA collection of master spreads.
metadataPreferencesMetadataPreference readonlyMetadata preference settings.
mixedInkGroupsMixedInkGroups MixedInkGroup readonlyA collection of mixed ink groups.
mixedInksMixedInks MixedInk readonlyA collection of mixed inks.
modifiedbool readonlyIf true, the Document has been modified since it was last saved.
mojikumiTablesMojikumiTables MojikumiTable readonlyA collection of mojikumi tables.
mojikumiUIPreferencesMojikumiUiPreference readonlyMojikumi user interface preference settings.
motionPresetsMotionPresets MotionPreset readonlyA collection of Motion presets.
multiStateObjectsMultiStateObjects MultiStateObject readonlyA collection of multi-state objects.
namestring readonlyThe name of the Document.
namedGridsNamedGrids NamedGrid readonlyA collection of named grids.
numberingListsNumberingLists NumberingList readonlyA collection of numbered lists.
objectStyleGroupsObjectStyleGroups ObjectStyleGroup readonlyA collection of object style groups.
objectStylesObjectStyles ObjectStyle readonlyA collection of object styles.
ovalsOvals Oval readonlyA collection of ellipses.
pageItemDefaultsPageItemDefault readonlyThe default page item formatting for the Document.
pageItemsPageItems PageItem 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 Page readonlyA collection of pages.
paragraphDestinationsParagraphDestinations ParagraphDestination readonlyA collection of paragraph destinations.
paragraphStyleGroupsParagraphStyleGroups ParagraphStyleGroup readonlyA collection of paragraph style groups.
paragraphStylesParagraphStyles ParagraphStyle readonlyA collection of paragraph styles.
parentApplication readonlyThe parent of the Document (a Application).
pasteboardPreferencesPasteboardPreference readonlyPasteboard preference settings.
placeGunsPlaceGun readonlyThe place gun.
polygonsPolygons Polygon readonlyA collection of polygons.
preferencesPreferences Preference readonlyA collection of preferences objects.
preflightOptionsPreflightOption readonlyPreflight option settings.
preflightProfilesPreflightProfiles PreflightProfile 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 Rectangle readonlyA collection of rectangles.
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 Section readonlyA collection of sections.
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 SplineItem readonlyThe spline items collection.
spreadsSpreads Spread readonlyA collection of spreads.
storiesStories Story readonlyA collection of stories.
storyGridDataStoryGridDataInformation readonlyDefault properties specific to frame grids.
storyPreferencesStoryPreference readonlyStory preference settings.
stripedStrokeStylesStripedStrokeStyles StripedStrokeStyle readonlyA collection of striped stroke styles.
strokeStylesStrokeStyles StrokeStyle readonlyA collection of stroke styles.
swatchesSwatches readonlyA collection of swatches.
tableStyleGroupsTableStyleGroups TableStyleGroup readonlyA collection of table style groups.
tableStylesTableStyles TableStyle readonlyA collection of table styles.
taggedPDFPreferencesTaggedPDFPreference readonlyTagged PDF preferences.
textDefaultsTextDefault readonlyText default settings.
textFramePreferencesTextFramePreference readonlyText frame preference settings.
textFramesTextFrames TextFrame readonlyA collection of text frames.
textPreferencesTextPreference readonlyText preference settings.
textVariablesTextVariables TextVariable readonlyA collection of text variables.
textWrapPreferencesTextWrapPreference readonlyThe text wrap preference properties that define the default formatting for wrapping text around objects.
tintsTints Tint readonlyA collection of tints.
tocStylesTOCStyles TOCStyle readonlyA collection of TOC styles.
transparencyPreferencesTransparencyPreference readonlyTransparency preference settings.
trapPresetsTrapPresets TrapPreset readonlyA collection of trap presets.
unusedSwatchesArray of Swatch readonlyThe swatches that are not being used.
validationErrorsValidationErrors ValidationError 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
xmlCommentsXMLComments XMLComment readonlyA collection of XML comments.
xmlElementsXMLElements XMLElement readonlyA collection of XML elements.
xmlExportMapsXMLExportMaps XMLExportMap readonlyA collection of XML export maps.
xmlExportPreferencesXMLExportPreference readonlyXML export preference settings.
xmlImportMapsXMLImportMaps XMLImportMap readonlyA collection of XML import maps.
xmlImportPreferencesXMLImportPreference readonlyXML import preference settings.
xmlInstructionsXMLInstructions XMLInstruction readonlyA collection of XML instructions.
xmlItemsXMLItems XMLItem readonlyA collection of XML items.
xmlPreferencesXMLPreference readonlyThe XML preference settings.
xmlStoriesXmlStories XmlStory readonlyA collection of xml stories.
xmlTagsXMLTags XMLTag readonlyA collection of XML tags.
zeroPointArray of Measurement Unit (Number or String) r/wThe ruler origin, specified as page coordinates in the format [x, y].

Class

PropertyTypeAccessDescription
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_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)

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.NO][, savingIn: File][, versionComments: string][, forceSave: bool=false])
Close the Document

ParameterTypeDescription
savingSaveOptions:
SaveOptions.NO
SaveOptions.YES
Whether to save changes before closing the Document (Optional) (default: SaveOptions.NO)
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[, using: PDFExportPreset][, withGrids: bool=false][, 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.
usingPDFExportPresetThe export style. (Optional)
withGridsboolIf true, exports the grids. (Optional) (default: false)
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.NAMED_GRIDS_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 placeAndLink (parentStory: Story[, showingOptions: bool=false])
Deprecated: Use ContentPlacerObject load method. Original Description: Place following the behavior of the place and link story menu item. This will load the place gun.

ParameterTypeDescription
parentStoryStoryThe story to place and link from.
showingOptionsboolWhether to display the link options dialog (Optional) (default: false)

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

ParameterTypeDescription
usingPrinterPreset
PrinterPresetTypes
Printer preset to use. Can accept: PrinterPresetTypes enumerator or PrinterPreset. (Optional)
withGridsboolWhether to print grids (Optional) (default: false)

void printBooklet ([using: varies])
Print the Booklet using current document and Booklet and Print settings in the document

ParameterTypeDescription
usingPrinterPreset
PrinterPresetTypes
Printer preset to use. Can accept: PrinterPresetTypes enumerator or PrinterPreset. (Optional)

void recompose ()
Recomposes the text in the Document.

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)

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 updateCrossReferences ()
Updates cross references' text source content in the document.

Element of

AnchoredObjectDefault.parent

Article.parent

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

EPubExportPreference.parent

ExportForWebPreference.parent

Font.parent

FootnoteOption.parent

FrameFittingOption.parent

Gradient.parent

GridPreference.parent

GuidePreference.parent

HTMLExportPreference.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

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

StripedStrokeStyle.parent

StrokeStyle.parent

Swatch.parent

TOCStyle.parent

TaggedPDFPreference.parent

TextDefault.parent

TextPreference.parent

TextVariable.parent

TextWrapPreference.parent

Tint.parent

TransparencyPreference.parent

TrapPreset.parent

ValidationError.parent

ViewPreference.parent

WatermarkPreference.parent

XMLComment.parent

XMLElement.parent

XMLExportMap.parent

XMLExportPreference.parent

XMLImportMap.parent

XMLImportPreference.parent

XMLInstruction.parent

XMLItem.parent

XMLPreference.parent

XMLTag.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 ([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, 28-Apr-2012 v3.0.3iContents :: Index