Adobe InCopy CS6 (8.0) Object Model JS: DocumentPreset

InCopy CS6

Class

DocumentPreset

 A preset that contains all of the new document settings.

QuickLinks

addEventListener, duplicate, extractLabel, getElements, insertLabel, remove, removeEventListener, toSource, toSpecifier

Hierarchy

Application
DocumentPreset
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
eventListenersEventListeners EventListener readonlyA collection of event listeners.
eventsEvents Event readonlyA collection of events.
facingPagesbool r/wIf true, the document has facing pages.
idnumber readonlyThe unique ID of the DocumentPreset.
indexnumber readonlyThe index of the DocumentPreset within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
namestring r/wThe name of the DocumentPreset.
pageHeightMeasurement Unit (Number or String) r/wThe height of the page.
pageSizestring r/wThe size of the page.
pageWidthMeasurement Unit (Number or String) r/wThe width of the page.
parentApplication readonlyThe parent of the DocumentPreset (a Application).
propertiesObject r/wA property that allows setting of several properties at the same time.
textAreaDepthnumber r/wThe depth of the text area.
textAreaDepthUnitTextAreaDepthUnit:
TextAreaDepthUnit.DEPTH_CHARS
TextAreaDepthUnit.DEPTH_WORDS
TextAreaDepthUnit.DEPTH_LINES
TextAreaDepthUnit.DEPTH_COLUMN_INCHES
TextAreaDepthUnit.DEPTH_PAGES
r/wThe unit in which to measure the text area depth.
textAreaWidthMeasurement Unit (Number or String) r/wThe width of the text area.

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)

DocumentPreset duplicate ()
Duplicates the DocumentPreset.

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

ParameterTypeDescription
keystringThe key.

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

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

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void remove ()
Deletes the DocumentPreset.

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)

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

string toSpecifier ()
Retrieves the object specifier.

Used in:

DocumentPreset DocumentPresets.nextItem (obj: DocumentPreset)

DocumentPreset DocumentPresets.previousItem (obj: DocumentPreset)

Return

DocumentPreset DocumentPreset.duplicate ()

Array of DocumentPreset DocumentPreset.getElements ()

DocumentPreset DocumentPresets.[] (index: number)

DocumentPreset DocumentPresets.add ([withProperties: Object])

DocumentPreset DocumentPresets.anyItem ()

Array of DocumentPreset DocumentPresets.everyItem ()

DocumentPreset DocumentPresets.firstItem ()

DocumentPreset DocumentPresets.item (index: varies)

DocumentPreset DocumentPresets.itemByID (id: number)

DocumentPreset DocumentPresets.itemByName (name: string)

Array of DocumentPreset DocumentPresets.itemByRange (from: varies, to: varies)

DocumentPreset DocumentPresets.lastItem ()

DocumentPreset DocumentPresets.middleItem ()

DocumentPreset DocumentPresets.nextItem (obj: DocumentPreset)

DocumentPreset DocumentPresets.previousItem (obj: DocumentPreset)

Jongware, 29-Apr-2012 v3.0.3iContents :: Index