Adobe InDesign CS4 (6.0) Object Model JS: Document

InDesign CS4

Class

Document

 A document.

QuickLinks

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

Hierarchy

Application
Document
AnchoredObjectDefault | AnchoredObjectSetting | Assignment | BaselineFrameGridOption | Bookmark | ButtonPreference | CellStyle | CellStyleGroup | ChapterNumberPreference | CharacterStyle | CharacterStyleGroup | Color | 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 | Language | Layer | LayoutAdjustmentPreference | LayoutWindow | MarginPreference | MasterSpread | MetadataPreference | MixedInk | MixedInkGroup | NumberingList | ObjectStyle | ObjectStyleGroup | PageItemDefault | ParagraphDestination | ParagraphStyle | ParagraphStyleGroup | PasteboardPreference | Preference | PreflightOption | PreflightProfile | PrintBookletOption | PrintBookletPrintPreference | PrintEvent | PrintPreference | Section | Spread | Story | StoryPreference | StoryWindow | StripedStrokeStyle | StrokeStyle | Swatch | TOCStyle | TableStyle | TableStyleGroup | TextDefault | TextFramePreference | TextPreference | TextVariable | TextWrapPreference | Tint | TransparencyPreference | TrapPreset | ValidationError | ViewPreference | 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.
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.
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.
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.
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.
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.
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.
namestring readonlyThe name of the Document.
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.
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.
spreadsSpreads readonlyA collection of spreads.
storiesStories readonlyA collection of stories.
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.
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].

Methods

Instances

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

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolIf true, the handler is called only in the capturing phase of event propagation. If false, the handler is called in the bubbling phase if the event is an ancestor of the target, or in the at-target phase if the parent of the event listener is itself the target of the event. (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)

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)

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 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: any)
Embed this profile to the document.

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

void exportFile (format: any, 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 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: any[, showingOptions: bool=false][, withProperties: Object])
Places the file.

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: any])
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: any])
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: any[, 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.
capturesboolIf true, the handler responds only in the capture phase. (Optional) (default: false)

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 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: any[, 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

AnchoredObjectSetting.parent

Application.activeDocument

Assignment.parent

Book.styleSourceDocument

Bookmark.parent

ButtonPreference.parent

ChapterNumberPreference.parent

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

Language.parent

Layer.parent

LayoutAdjustmentPreference.parent

LayoutWindow.parent

MarginPreference.parent

MasterSpread.parent

MetadataPreference.parent

MixedInk.parent

MixedInkGroup.parent

NumberingList.parent

PageItemDefault.parent

ParagraphDestination.parent

PasteboardPreference.parent

Preference.parent

PreflightOption.parent

PreflightProcess.targetObject

PreflightProfile.parent

PrintBookletOption.parent

PrintBookletPrintPreference.parent

PrintEvent.parent

PrintPreference.parent

Section.parent

Spread.parent

Story.parent

StoryWindow.parent

StripedStrokeStyle.parent

StrokeStyle.parent

Swatch.parent

TOCStyle.parent

TextDefault.parent

TextPreference.parent

TextVariable.parent

Tint.parent

TransparencyPreference.parent

TrapPreset.parent

ValidationError.parent

ViewPreference.parent

Window.parent

XMLExportMap.parent

XMLExportPreference.parent

XMLImportMap.parent

XMLImportPreference.parent

XMLPreference.parent

XMLTag.parent

XMLViewPreference.parent

XmlStory.parent

Used in:

array of any Asset.placeAsset (on: any)

Bookmark Bookmark.move ([to: LocationOptions=LocationOptions.AT_END][, reference: any])

Button Buttons.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

CellStyle CellStyle.move (to: LocationOptions[, reference: any])

CellStyleGroup CellStyleGroup.move (to: LocationOptions[, reference: any])

CharacterStyle CharacterStyle.move (to: LocationOptions[, reference: any])

CharacterStyleGroup CharacterStyleGroup.move (to: LocationOptions[, reference: any])

array of Document Documents.itemByRange (from: any, to: any)

Document Documents.nextItem (obj: Document)

Document Documents.previousItem (obj: Document)

GraphicLine GraphicLines.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

Group Groups.add (groupItems: Array of PageItem[, layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

any MasterSpread.duplicate ([to: LocationOptions=LocationOptions.AT_END][, reference: any])

Movie Movies.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

ObjectStyle ObjectStyle.move (to: LocationOptions[, reference: any])

ObjectStyleGroup ObjectStyleGroup.move (to: LocationOptions[, reference: any])

Oval Ovals.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

Page Pages.add ([at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

ParagraphStyle ParagraphStyle.move (to: LocationOptions[, reference: any])

ParagraphStyleGroup ParagraphStyleGroup.move (to: LocationOptions[, reference: any])

Polygon Polygons.add ([layer: Layer][, numberOfSides: number][, insetPercentage: number][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

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

Rectangle Rectangles.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

Sound Sounds.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

any Spread.duplicate ([to: LocationOptions=LocationOptions.AT_END][, reference: any])

Spread Spread.move ([to: LocationOptions=LocationOptions.AT_END][, reference: any])

Spread Spreads.add ([at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

TableStyle TableStyle.move (to: LocationOptions[, reference: any])

TableStyleGroup TableStyleGroup.move (to: LocationOptions[, reference: any])

TextFrame TextFrames.add ([layer: Layer][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, 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: any)

Document Documents.itemByName (name: string)

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

Document Documents.lastItem ()

Document Documents.middleItem ()

Document Documents.nextItem (obj: Document)

Document Documents.previousItem (obj: Document)

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