InstancesEventListener addEventListener (eventType:
string, handler:
varies[, captures:
bool=false])
Adds an event listener.
Parameter | Type | Description |
eventType | string | The event type. |
handler | File JavaScript Function | The event handler. Can accept: File or JavaScript Function. |
captures | bool | This parameter is obsolete. (Optional) (default: false) |
void align (alignDistributeItems:
Array of PageItem, alignOption:
AlignOptions[, alignDistributeBounds:
AlignDistributeBounds][, reference:
PageItem])
Align page items.
Parameter | Type | Description |
alignDistributeItems | Array of PageItem | The page items to align or distribute. |
alignOption | AlignOptions: AlignOptions.LEFT_EDGES AlignOptions.TOP_EDGES AlignOptions.RIGHT_EDGES AlignOptions.BOTTOM_EDGES AlignOptions.HORIZONTAL_CENTERS AlignOptions.VERTICAL_CENTERS | The type of alignment to apply. |
alignDistributeBounds | AlignDistributeBounds: AlignDistributeBounds.ITEM_BOUNDS AlignDistributeBounds.PAGE_BOUNDS AlignDistributeBounds.MARGIN_BOUNDS AlignDistributeBounds.SPREAD_BOUNDS AlignDistributeBounds.KEY_OBJECT | The bounds within which to align or distribute the page items. (Optional) |
reference | PageItem | The reference or key object to align to distribute relative to. Required when 'align distribute bounds' specifies 'key object'. (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.
Parameter | Type | Description |
reverseOrder | bool | If 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.
Parameter | Type | Description |
reverseOrder | bool | If 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.
Parameter | Type | Description |
reverseOrder | bool | If 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.
Parameter | Type | Description |
reverseOrder | bool | If 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.
Parameter | Type | Description |
reverseOrder | bool | If true, returns the results in reverse order. (Optional) |
void checkIn ([versionComments:
string][, forceSave:
bool=false])
Check in to Version Cue.
Parameter | Type | Description |
versionComments | string | The comment for this version (Optional) |
forceSave | bool | Forcibly 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
Parameter | Type | Description |
saving | SaveOptions: SaveOptions.NO SaveOptions.YES | Whether to save changes before closing the Document (Optional) (default: SaveOptions.NO) |
savingIn | File | The file in which to save the Document (Optional) |
versionComments | string | The comment for this version (Optional) |
forceSave | bool | Forcibly save a version (Optional) (default: false) |
void createAlternateLayout (spreadItems:
Array of Spread, name:
string, width:
Measurement Unit (Number or String), height:
Measurement Unit (Number or String), createTextStyles:
bool, linkTextStories:
bool, layoutRule:
LayoutRuleOptions)
Creates an alternate layout for a given list of spreads.
Parameter | Type | Description |
spreadItems | Array of Spread | The spreads to create an alternate layout for. |
name | string | The name of the alternate layout. Note: This is used for the named layout for the new section for the duplicated spreads. |
width | Measurement Unit (Number or String) | The width of the pages created. |
height | Measurement Unit (Number or String) | The height of the pages created. |
createTextStyles | bool | Whether to create new text styles. |
linkTextStories | bool | Whether to create linked text for duplicated text stories. |
layoutRule | LayoutRuleOptions: LayoutRuleOptions.OFF LayoutRuleOptions.SCALE LayoutRuleOptions.RECENTER LayoutRuleOptions.GUIDE_BASED LayoutRuleOptions.OBJECT_BASED LayoutRuleOptions.USE_MASTER LayoutRuleOptions.PRESERVE_EXISTING | What layout rule to set on the pages. |
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.
Parameter | Type | Description |
using | TOCStyle | The TOC style to use to define the content, title, and format of the table of contents. |
replacing | bool | If true, replaces the existing TOC. (Optional) (default: false) |
fromBook | Book | The book whose documents to include in the TOC. (Optional) |
placePoint | Array 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) |
includeOverset | bool | If true, includes overset text TOC entries in the TOC. (Optional) (default: false) |
destinationLayer | Layer | The layer on which to place the TOC. (Optional) |
void deleteAlternateLayout (name:
string)
Deletes an alternate layout.
Parameter | Type | Description |
name | string | The name of the alternate layout to delete. |
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)][, reference:
PageItem])
Distribute page items.
Parameter | Type | Description |
alignDistributeItems | Array of PageItem | The page items to align or distribute |
distributeOption | DistributeOptions: 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. |
alignDistributeBounds | AlignDistributeBounds: AlignDistributeBounds.ITEM_BOUNDS AlignDistributeBounds.PAGE_BOUNDS AlignDistributeBounds.MARGIN_BOUNDS AlignDistributeBounds.SPREAD_BOUNDS AlignDistributeBounds.KEY_OBJECT | The bounds within which to align or distribute the page items. (Optional) |
useDistributeMeasurement | bool | If true, distribute space between page items. When this property is true, the bounds setting is ignored. (Optional) |
absoluteDistributeMeasurement | Measurement Unit (Number or String) | The distance to use when distributing page items. Required when 'align distribute bounds' specifies 'key object'. (Optional) |
reference | PageItem | The reference or key object to align to distribute relative to. Required when 'align distribute bounds' specifies 'key object'. (Optional) |
PreflightProfile embed (using:
varies)
Embed this profile to the document.
Parameter | Type | Description |
using | PreflightProfile 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.
Parameter | Type | Description |
format | ExportFormat 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. |
to | File | The path to the export file. |
using | PDFExportPreset | The export style. (Optional) |
withGrids | bool | If true, exports the grids. (Optional) (default: false) |
versionComments | string | The comment for this version. (Optional) |
forceSave | bool | If 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.
Parameter | Type | Description |
to | File | The file to save to |
strokeStyleList | Array of StrokeStyle | The list of stroke styles to save |
versionComments | string | The comment for this version (Optional) |
forceSave | bool | Forcibly save a version (Optional) (default: false) |
string extractLabel (key:
string)
Gets the label value associated with the specified key.
Parameter | Type | Description |
key | string | The key. |
Array of Text findGlyph ([reverseOrder:
bool])
Finds glyphs that match the find what value.
Parameter | Type | Description |
reverseOrder | bool | If true, returns the results in reverse order. (Optional) |
Array of Text findGrep ([reverseOrder:
bool])
Finds text that matches the find what value.
Parameter | Type | Description |
reverseOrder | bool | If true, returns the results in reverse order. (Optional) |
Array of PageItem findObject ([reverseOrder:
bool])
Finds objects that match the find what value.
Parameter | Type | Description |
reverseOrder | bool | If true, returns the results in reverse order. (Optional) |
Array of Text findText ([reverseOrder:
bool])
Finds text that matches the find what value.
Parameter | Type | Description |
reverseOrder | bool | If true, returns the results in reverse order. (Optional) |
Array of Text findTransliterate ([reverseOrder:
bool])
Finds text that matches the find character type value.
Parameter | Type | Description |
reverseOrder | bool | If 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.
Parameter | Type | Description |
name | string | The process color to load. |
Color importAdobeSwatchbookSpotColor (name:
string)
Imports a spot color swatch from an Adobe color book.
Parameter | Type | Description |
name | string | The spot color to load. |
void importDtd (from:
File)
Imports a DTD to use for validation.
Parameter | Type | Description |
from | File | The path to the DTD file. |
void importFormats (from:
File)
Imports the cross reference formats from specified file.
Parameter | Type | Description |
from | File | The file whose formats to import. |
void importStyles (format:
ImportFormat, from:
File[, globalStrategy:
GlobalClashResolutionStrategy=GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE])
Imports the specified styles.
Parameter | Type | Description |
format | ImportFormat: 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. |
from | File | The file containing the styles you want to import. |
globalStrategy | GlobalClashResolutionStrategy: 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.
Parameter | Type | Description |
from | File | The XML file. |
void insertLabel (key:
string, value:
string)
Sets the label to the value associated with the specified key.
Parameter | Type | Description |
key | string | The key. |
value | string | The value. |
void loadConditions (from:
File[, loadConditionSets:
bool])
Load conditions from the specified file.
Parameter | Type | Description |
from | File | The path to the file that contains the conditions. |
loadConditionSets | bool | If 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.
Parameter | Type | Description |
from | File | The InDesign file to load the masters from. |
globalStrategyForMasterPage | GlobalClashResolutionStrategyForMasterPage: 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.
Parameter | Type | Description |
from | File | The swatch file or InDesign document. |
void loadXMLTags (from:
File)
Loads a set of XML markup tags from the specified file.
Parameter | Type | Description |
from | File | The 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.
Parameter | Type | Description |
to | File | The folder, alias, or path in which to place the packaged files. |
copyingFonts | bool | If true, copies fonts used in the document to the package folder. |
copyingLinkedGraphics | bool | If true, copies linked graphics files to the package folder. |
copyingProfiles | bool | If true, copies color profiles to the package folder. |
updatingGraphics | bool | If true, updates graphics links to the package folder. |
includingHiddenLayers | bool | If true, copies fonts and links from hidden layers to the package. |
ignorePreflightErrors | bool | If true, ignores preflight errors and proceeds with the packaging. If false, cancels the packaging when errors exist. |
creatingReport | bool | If true, creates a package report that includes printing instructions, print settings, lists of fonts, links and required inks, and other information. |
versionComments | string | The comments for the version. (Optional) |
forceSave | bool | If 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.
Parameter | Type | Description |
parentStory | Story | The story to place and link from. |
showingOptions | bool | Whether to display the link options dialog (Optional) (default: false) |
void print ([using:
varies][, withGrids:
bool=false])
Prints the Document(s).
Parameter | Type | Description |
using | PrinterPreset PrinterPresetTypes | Printer preset to use. Can accept: PrinterPresetTypes enumerator or PrinterPreset. (Optional) |
withGrids | bool | Whether to print grids (Optional) (default: false) |
void printBooklet ([using:
varies])
Print the Booklet using current document and Booklet and Print settings in the document
void recompose ()
Recomposes the text in the Document.
bool removeEventListener (eventType:
string, handler:
varies[, captures:
bool=false])
Removes the event listener.
Parameter | Type | Description |
eventType | string | The registered event type. |
handler | File JavaScript Function | The registered event handler. Can accept: File or JavaScript Function. |
captures | bool | This 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.
Parameter | Type | Description |
forceRevert | bool | Forcibly reverts to the project version. (Optional) (default: false) |
Document save ([to:
File][, stationery:
bool=false][, versionComments:
string][, forceSave:
bool=false])
Save the document
Parameter | Type | Description |
to | File | Where 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) |
stationery | bool | Whether to save the file as stationery (Optional) (default: false) |
versionComments | string | The comment for this version (Optional) |
forceSave | bool | Forcibly save a version (Optional) (default: false) |
void saveACopy ([to:
File][, stationery:
bool=false])
Saves a copy of the document.
Parameter | Type | Description |
to | File | The file path for the copy. Note: Leaves the original document open and does not open the copy. (Optional) |
stationery | bool | If 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.
Parameter | Type | Description |
to | File | The swatchbook file to save to. |
swatchList | Array of Swatch | The swatch(es) to save. |
versionComments | string | The comment for this version. (Optional) |
forceSave | bool | If 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.
Parameter | Type | Description |
to | File | The full path to the file in which to save the tags. |
versionComments | string | The comment for this version. (Optional) |
forceSave | bool | If 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.
Parameter | Type | Description |
syncConflictResolution | SyncConflictResolution: 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) |
versionComments | string | The 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.
|