Adds an event listener.
Document
A document.
Document
78 objects
Article | Assignment | Bookmark | CellStyle | CellStyleGroup | CellStyleMapping | CharStyleMapping | CharacterStyle | CharacterStyleGroup | Color | ColorGroup | CompositeFont | Condition | ConditionSet | CrossReferenceFormat | CrossReferenceSource | DTD | DashedStrokeStyle | DataMergeImagePlaceholder | DataMergeQrcodePlaceholder | DataMergeTextPlaceholder | DocumentEvent | DottedStrokeStyle | Font | Gradient | Hyperlink | HyperlinkExternalPageDestination | HyperlinkPageDestination | HyperlinkPageItemSource | HyperlinkTextDestination | HyperlinkTextSource | HyperlinkURLDestination | HyphenationException | ImportExportEvent | Index_ | IndexingSortOption | Ink | KinsokuTable | Language | Layer | MasterSpread | MixedInk | MixedInkGroup | MojikumiTable | MotionPreset | NamedGrid | NumberingList | ObjectStyle | ObjectStyleGroup | PDFComment | ParaStyleMapping | ParagraphDestination | ParagraphStyle | ParagraphStyleGroup | PreflightProfile | PrintEvent | Section | Spread | Story | StripedStrokeStyle | StrokeStyle | Swatch | TOCStyle | TableStyle | TableStyleGroup | TableStyleMapping | TextVariable | Tint | TrapPreset | ValidationError | XMLComment | XMLElement | XMLExportMap | XMLImportMap | XMLInstruction | XMLItem | XMLTag | XmlStory
51 preference objects
AdjustLayoutPreference | AnchoredObjectDefault | AnchoredObjectSetting | BaselineFrameGridOption | ButtonPreference | ChapterNumberPreference | CjkGridPreference | ConditionalTextPreference | DataMerge | DataMergeOption | DictionaryPreference | DocumentPreference | EPubExportPreference | EPubFixedLayoutExportPreference | EndnoteOption | ExportForWebPreference | FootnoteOption | FrameFittingOption | GridPreference | GuidePreference | HTMLExportPreference | HTMLFXLExportPreference | IndexOptions | LayoutGridDataInformation | LinkedPageItemOption | LinkedStoryOption | MarginPreference | MetadataPreference | MojikumiUiPreference | PageItemDefault | PasteboardPreference | PlaceGun | Preference | PreflightOption | PrintBookletOption | PrintBookletPrintPreference | PrintPreference | PublishExportPreference | StoryGridDataInformation | StoryPreference | TaggedPDFPreference | TextDefault | TextFramePreference | TextPreference | TextWrapPreference | TransparencyPreference | ViewPreference | WatermarkPreference | XMLExportPreference | XMLImportPreference | XMLPreference
Properties
| Name | Type | Access | Description |
|---|---|---|---|
| Boolean | read/write | If true, uses LAB alternates for spot colors when available. | |
| Layer | String | read/write | The active layer. Can also accept: String. | |
| PreflightProcess | readonly | The active preflight process for this document. | |
| AdjustLayoutPreference | readonly | Adjust layout preference settings. | |
| RenderingIntent | read/write | The rendering intent for colors that result from transparency interactions on the page after blending. | |
| CellStyle[] | readonly | All Cell styles | |
| CharacterStyle[] | readonly | Lists all character styles (regardless of their group). | |
| Graphic[] | readonly | Lists all graphics contained by the Document. | |
| ObjectStyle[] | readonly | All object styles contained by the Document. | |
| PageItem[] | readonly | Lists all page items contained by the Document. | |
| ParagraphStyle[] | readonly | Lists all paragraph styles (regardless of their group). | |
| TableStyle[] | readonly | All Table styles | |
| AnchoredObjectDefault | readonly | Anchored object default settings. | |
| AnchoredObjectSetting | readonly | Anchored object settings. | |
| Number | read/write | The font size (in points) for Math objects | |
| Number[] | read/write | RGB Color applied on the math object specified in 0-255 range. | |
| String | Swatch | NothingEnum | read/write | The swatch used for math object color. Also accepts swatch name.(RGB, CMYK, LAB and HSB swatches supported.). Can return: Swatch or NothingEnum enumerator. Can also accept: String. | |
| Articles |
readonly | A collection of articles. | |
| Assignments |
readonly | A collection of assignments. | |
| XMLItem | readonly | The XML element associated with the Document. | |
| BaselineFrameGridOption | readonly | Baseline frame grid option settings. | |
| Bookmarks |
readonly | A collection of bookmarks. | |
| ButtonPreference | readonly | Button preference settings. | |
| Buttons |
readonly | A collection of buttons. | |
| CellStyleGroups |
readonly | A collection of cell style groups. | |
| CellStyleMappings |
readonly | A collection of cell style mappings. | |
| CellStyles |
readonly | A collection of cell styles. | |
| ChapterNumberPreference | readonly | Chapter numbering preferences. | |
| CharStyleMappings |
readonly | A collection of char style mappings. | |
| CharacterStyleGroups |
readonly | A collection of character style groups. | |
| CharacterStyles |
readonly | A collection of character styles. | |
| CheckBoxes |
readonly | A collection of checkboxes. | |
| CjkGridPreference | readonly | CJK grid preference settings. | |
| ColorSettingsPolicy | read/write | The 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. | |
| String | read/write | The current CMYK profile. | |
| String[] | readonly | A list of valid CMYK profiles. | |
| ColorGroups |
readonly | A collection of color groups. | |
| Colors |
readonly | A collection of colors. | |
| ComboBoxes |
readonly | A collection of comboboxes. | |
| CompositeFonts |
readonly | A collection of composite fonts. | |
| ConditionSets |
readonly | A collection of condition sets for conditional text. | |
| ConditionalTextPreference | readonly | Conditional text preferences. | |
| Conditions |
readonly | A collection of conditions for conditional text. | |
| Boolean | readonly | If true, the Document was converted. | |
| CrossReferenceFormats |
readonly | A collection of cross reference formats. | |
| CrossReferenceSources |
readonly | A collection of cross reference text sources. | |
| DashedStrokeStyles |
readonly | A collection of dashed stroke styles. | |
| DataMergeImagePlaceholders |
readonly | A collection of data merge image placeholders. | |
| DataMergeOption | readonly | The data merge option properties that define the data merge. | |
| DataMerge | readonly | Data merge properties that define data merge fields and preferences. | |
| DataMergeQrcodePlaceholders |
readonly | A collection of data merge QR code placeholders. | |
| DataMergeTextPlaceholders |
readonly | A collection of data merge text placeholders. | |
| RenderingIntent | read/write | The rendering intent for bitmap images. | |
| DictionaryPreference | readonly | User dictionary preference settings. | |
| DocumentPreference | readonly | Document preference settings. | |
| DottedStrokeStyles |
readonly | A collection of dotted stroke styles. | |
| DTDs |
readonly | A collection of DTDs. | |
| EditingState | readonly | The Version Cue editing state of the file. | |
| EndnoteOption | readonly | Endnote option settings. | |
| EndnoteTextFrames |
readonly | A collection of endnote text frames. | |
| EPSTexts |
readonly | EPSTexts | |
| EPubExportPreference | readonly | EPub export preference settings. | |
| EPubFixedLayoutExportPreference | readonly | EPub fixed layout export preference settings. | |
| EventListeners |
readonly | A collection of event listeners. | |
| Events |
readonly | A collection of events. | |
| ExportForWebPreference | readonly | The default export for web preferences. | |
| Folder async | readonly | The path to the folder containing the document. | |
| Fonts |
readonly | A collection of fonts. | |
| FootnoteOption | readonly | Footnote option settings. | |
| FormFields |
readonly | A collection of form fields. | |
| FrameFittingOption | readonly | The frame fitting option to apply to placed or pasted content. Can be applied to a frame, object style, or document or to the application. | |
| File async | readonly | The full path to the Document, including the name of the Document. | |
| Gradients |
readonly | A collection of gradients. | |
| GraphicLines |
readonly | A collection of graphic lines. | |
| GridPreference | readonly | Grid preference settings. | |
| Groups |
readonly | A collection of groups. | |
| GuidePreference | readonly | Guide preference settings. | |
| Guides |
readonly | A collection of guides. | |
| HTMLExportPreference | readonly | HTML export preference settings. | |
| HTMLFXLExportPreference | readonly | HTML FXL export preference settings. | |
| HyperlinkExternalPageDestinations |
readonly | A collection of hyperlink external page destinations. | |
| HyperlinkPageDestinations |
readonly | A collection of hyperlink page destinations. | |
| HyperlinkPageItemSources |
readonly | A collection of hyperlink page item sources. | |
| HyperlinkTextDestinations |
readonly | A collection of hyperlink text destinations. | |
| HyperlinkTextSources |
readonly | A collection of hyperlink text sources. | |
| HyperlinkURLDestinations |
readonly | A collection of hyperlink URL destinations. | |
| Hyperlinks |
readonly | A collection of hyperlinks. | |
| HyphenationExceptions |
readonly | A collection of hyphenation exceptions lists. | |
| Number | readonly | The unique ID of the Document. | |
| Number | readonly | The index of the Document within its containing object. | |
| IndexOptions | readonly | The index options properties that define how an index is formatted. | |
| Indexes |
readonly | A collection of indexes. | |
| IndexingSortOptions |
readonly | A collection of indexing sort options. | |
| Inks |
readonly | A collection of inks. | |
| Boolean | readonly | If true, the document is a cloud document. | |
| Boolean | readonly | Returns true if the object specifier resolves to valid objects. | |
| KinsokuTables |
readonly | A collection of kinsoku tables. | |
| String | read/write | A property that can be set to any string. | |
| Languages |
readonly | A collection of languages. | |
| Layers |
readonly | A collection of layers. | |
| LayoutGridDataInformation | readonly | Default properties specific to layout grids. | |
| LinkedPageItemOption | readonly | Linked Page Item options | |
| LinkedStoryOption | readonly | Linked story options | |
| Links |
readonly | A collection of links. | |
| ListBoxes |
readonly | A collection of listboxes. | |
| MarginPreference | readonly | Margin preference settings. | |
| MasterSpreads |
readonly | A collection of master spreads. | |
| MathObjects |
readonly | A collection of math objects. | |
| MetadataPreference | readonly | Metadata preference settings. | |
| MixedInkGroups |
readonly | A collection of mixed ink groups. | |
| MixedInks |
readonly | A collection of mixed inks. | |
| Boolean | readonly | If true, the Document has been modified since it was last saved. | |
| MojikumiTables |
readonly | A collection of mojikumi tables. | |
| MojikumiUiPreference | readonly | Mojikumi user interface preference settings. | |
| MotionPresets |
readonly | A collection of Motion presets. | |
| Text[] | readonly | All MathZones in range; returns vector of Text objects for each MathZone | |
| String | read/write | InMath Control Code class to use for new MathZones and math expressions; 'InDesign' or 'InMath4' | |
| String | readonly | MathTools CUSTOM CFG folder path | |
| Number | readonly | Version of MathTools doc format used in this document | |
| Boolean | readonly | is MathTools enabled for this document | |
| MultiStateObjects |
readonly | A collection of multi-state objects. | |
| String | read/write | The name of the Document. | |
| NamedGrids |
readonly | A collection of named grids. | |
| NumberingLists |
readonly | A collection of numbered lists. | |
| ObjectStyleGroups |
readonly | A collection of object style groups. | |
| ObjectStyles |
readonly | A collection of object styles. | |
| Ovals |
readonly | A collection of ellipses. | |
| PageItemDefault | readonly | The default page item formatting for the Document. | |
| PageItems |
readonly | The 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. | |
| Pages |
readonly | A collection of pages. | |
| ParaStyleMappings |
readonly | A collection of para style mappings. | |
| ParagraphDestinations |
readonly | A collection of paragraph destinations. | |
| ParagraphStyleGroups |
readonly | A collection of paragraph style groups. | |
| ParagraphStyles |
readonly | A collection of paragraph styles. | |
| Application | readonly | The parent of the Document (a Application). | |
| PasteboardPreference | readonly | Pasteboard preference settings. | |
| PDFComments |
readonly | A collection of PDF comment objects | |
| PlaceGun | readonly | The place gun. | |
| Polygons |
readonly | A collection of polygons. | |
| Boolean | read/write | Preference to export math objects as MathML or SVG in EPUB export. | |
| Preferences |
readonly | A collection of preferences objects. | |
| PreflightOption | readonly | Preflight option settings. | |
| PreflightProfiles |
readonly | A collection of preflight profiles. | |
| PrintBookletOption | readonly | Booklet printing options. | |
| PrintBookletPrintPreference | readonly | Print booklet preferences. | |
| PrintPreference | readonly | Print preference settings. | |
| Object | read/write | A property that allows setting of several properties at the same time. | |
| PublishExportPreference | readonly | Publish export preference settings. | |
| RadioButtons |
readonly | A collection of radio buttons. | |
| Boolean | readonly | If true, the Document is read-only. | |
| Boolean | readonly | If true, the Document was recovered. | |
| Rectangles |
readonly | A collection of rectangles. | |
| ColorSettingsPolicy | read/write | The 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. | |
| String | read/write | The current RGB profile. | |
| String[] | readonly | A list of valid RGB profiles. | |
| Boolean | readonly | If true, the Document has been saved since it was created. | |
| Sections |
readonly | A collection of sections. | |
| SignatureFields |
readonly | A collection of signature fields. | |
| RenderingIntent | read/write | The rendering intent for all vector art (areas of solid color) in native objects. | |
| SplineItems |
readonly | The spline items collection. | |
| Spreads |
readonly | A collection of spreads. | |
| Stories |
readonly | A collection of stories. | |
| StoryGridDataInformation | readonly | Default properties specific to frame grids. | |
| StoryPreference | readonly | Story preference settings. | |
| StripedStrokeStyles |
readonly | A collection of striped stroke styles. | |
| StrokeStyles |
readonly | A collection of stroke styles. | |
| Swatches |
readonly | A collection of swatches. | |
| TableStyleGroups |
readonly | A collection of table style groups. | |
| TableStyleMappings |
readonly | A collection of table style mappings. | |
| TableStyles |
readonly | A collection of table styles. | |
| TaggedPDFPreference | readonly | Tagged PDF preferences. | |
| TextBoxes |
readonly | A collection of text boxes. | |
| TextDefault | readonly | Text default settings. | |
| TextFramePreference | readonly | Text frame preference settings. | |
| TextFrames |
readonly | A collection of text frames. | |
| TextPreference | readonly | Text preference settings. | |
| TextVariables |
readonly | A collection of text variables. | |
| TextWrapPreference | readonly | The text wrap preference properties that define the default formatting for wrapping text around objects. | |
| Number 0–100 | read/write | The percent of the base color. (Range: 0 to 100) | |
| Tints |
readonly | A collection of tints. | |
| TOCStyles |
readonly | A collection of TOC styles. | |
| TransparencyPreference | readonly | Transparency preference settings. | |
| TrapPresets |
readonly | A collection of trap presets. | |
| Swatch[] | readonly | The swatches that are not being used. | |
| ValidationErrors |
readonly | A collection of XML validation errors. | |
| VersionState | readonly | The Version Cue version state of the file. | |
| ViewPreference | readonly | View preference settings. | |
| Boolean | readonly | If true, the Document is visible. | |
| WatermarkPreference | readonly | Watermark preferences | |
| XMLComments |
readonly | A collection of XML comments. | |
| XMLElements |
readonly | A collection of XML elements. | |
| XMLExportMaps |
readonly | A collection of XML export maps. | |
| XMLExportPreference | readonly | XML export preference settings. | |
| XMLImportMaps |
readonly | A collection of XML import maps. | |
| XMLImportPreference | readonly | XML import preference settings. | |
| XMLInstructions |
readonly | A collection of XML instructions. | |
| XMLItems |
readonly | A collection of XML items. | |
| XMLPreference | readonly | The XML preference settings. | |
| XmlStories |
readonly | A collection of xml stories. | |
| XMLTags |
readonly | A collection of XML tags. | |
| Number[] | String[] unit | read/write | The ruler origin, specified as page coordinates in the format [x, y]. |
Events
| Name | Description |
|---|---|
| Dispatched after a Document is exported. This event bubbles. This event is not cancelable. | |
| Dispatched after importing a file into a Document. This event bubbles. This event is not cancelable. | |
| Dispatched after one or more links in the Document have been added, deleted, or modified. This event bubbles. This event is not cancelable. | |
| Dispatched after a Document is created. This event bubbles. This event is not cancelable. | |
| Dispatched after a Document is opened. This event bubbles. This event is not cancelable. | |
| Dispatched after a Document is printed. This event bubbles. This event is not cancelable. | |
| Dispatched after a Document is reverted. This event bubbles. This event is not cancelable. | |
| Dispatched after a Document is saved. This event bubbles. This event is not cancelable. | |
| Dispatched after a Document is saved under a new name. This event bubbles. This event is not cancelable. | |
| Dispatched after a copy of a Document is saved. This event bubbles. This event is not cancelable. | |
| Dispatched before a Document is closed. This event bubbles. This event is not cancelable. | |
| Dispatched before a Document is exported. This event bubbles. This event is cancelable. | |
| Dispatched before importing a file into a Document. This event bubbles. This event is cancelable. | |
| Dispatched before a Document is printed. This event bubbles. This event is cancelable. | |
| Dispatched before a Document is reverted. This event bubbles. This event is cancelable. | |
| Dispatched before a Document is saved. This event bubbles. This event is cancelable. | |
| Dispatched before a Document is saved under a new name. This event bubbles. This event is cancelable. | |
| Dispatched before a copy of a Document is saved. This event bubbles. This event is cancelable. | |
| Dispatched after a Document export is canceled or fails. This event bubbles. This event is not cancelable. |
Methods
Adjust the existing layout according to new page size, bleed and margin values. The first parameter is a plain object with key value pairs for properties affected. Permissible keys are width, height, bleedInside, bleedTop, bleedOutside, bleedBottom, leftMargin, topMargin, rightMargin, bottomMargin. The values can be specified as decimal numbers in units of Pt or as a string having a measurement value such as '1 in'. Not all properties need to be specified, only the values that need updation. Notice that when dealing with individual pages rather than the whole document, bleed changes has no effect. E.g. - app.activeDocument.adjustLayout({width:'600px', leftMargin: '1in'}), app.activeDocument.adjustLayout({rightMargin:'1in'}, app.activeDocument.spreads[0].pages), app.activeDocument.spreads[0].pages[0].adjustLayout({width:'400px', leftMargin: '10px'})
Align page items.
Finds color that matches the find what value and replaces the color with the change to value.
Change comoser to optyca
Finds glyphs that match the find what value and replaces the glyphs with the change to value.
Finds text that matches the find what value and replaces the text with the change to value.
Finds objects that match the find what value and replace the objects with the change to value.
Finds text that matches the find what value and replaces the text with the change to value.
Finds text that matches the find character type value and replaces the text with the change character type value.
Check in to Version Cue.
Removes the frame fittings options and resets it to the initial state.
Close the Document
Transforms color values
Creates an alternate layout for a given list of spreads.
Create Email QR Code on the page item or document
Creates a new object from MathML description.
Create Hyperlink QR Code on the page item or document
Create Plain Text QR Code on the page item
Creates a table of contents.
Create Text Msg QR Code on the page item or document
Create Business Card QR Code on the page item or load on document's placegun
Deletes an alternate layout.
Deletes unused XML markup tags.
Distribute page items.
Embed this profile to the document.
Exports the object(s) to a file.
Exports selected page items to snippet on the destination file path.
Exports input page item ids to snippet on the destination file path.
Exports stroke styles or presets.
Gets the label value associated with the specified key.
Finds color that matches the find what value.
Finds glyphs that match the find what value.
Finds text that matches the find what value.
Finds objects that match the find what value.
Finds text that matches the find what value.
Finds text that matches the find character type value.
This will return an array of structs containing information about the alternate layouts.
Resolves the object specifier, creating an array of object references.
Internal Use Only
Imports a process color swatch from a preloaded Adobe color book.
Imports a spot color swatch from an Adobe color book.
Imports a DTD to use for validation.
Imports the cross reference formats from specified file.
Import Commemnts from PDF
Imports the specified styles.
Imports the specified XML file into an InDesign document.
Sets the label to the value associated with the specified key.
Internal use only: a black box method for use by InDesign Engineering team only.
Load conditions from the specified file.
Load masterpages from an InDesign file.
Load swatches from the specified file.
Loads a set of XML markup tags from the specified file.
Auto tag the document based on the style to tag mappings
Auto style the document based on the tag to style mappings
Cleanup after export MathZones as Inlines
Cleanup after export MathZones as MathML
Cleanup after export MathZones for PDF
convert a mt.editor V1 doc to MathTools V2
convert MTEF encoded image(s) into MathZone(s) on the given object (Story, Paragraph, Word, Character, Text, InsertionPoint) and return the resulting Text,Table,Cell object.
enable MathTools for given document and bootstrap the MathTemplates, MathStyle,...
creates temporary DOCX with equations prepared for importing by MathTools
Prepare to export MathZones as Inlines
Prepare to export MathZones as MathML
Prepare to export MathZones for PDF
Packages the document.
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.
Prints the Document(s).
Print the Booklet using current document and Booklet and Print settings in the document
Recomposes the text in the Document.
Removes the event listener.
Resets all the buttons to their Normal state.
Resets all the multi-state objects to their first state.
Reverts the document to its state at the last save operation.
Reverts to the version of the document in Version Cue.
Save the document
Saves a copy of the document.
Saves the specified swatch(es) to a swatchbook file.
Saves a set of tags to an external file.
Synchronizes the file with the Version Cue project.
Generates a string which, if executed, will return the Document.
Retrieves the object specifier.
Updates cross references' text source content in the document.
Object of 134
Properties elsewhere that hold a Document.
Parameter of 44
Method parameters that accept a Document.
Return 15
Methods that return a Document.