TypefiDocumentSettings

Typefi settings on the document level

Methods:

addEventListener, createAnchor, createAssociation, createTOC, getElements, getFieldValue, getMissingFonts, getMissingLinks, getNextFreeImageFrame, removeAssociation, removeEventListener, resetAllToDefaults, setField, setFirstPageNumber, toSource, toSpecifier

Hierarchy:

Superclass: Preference

Class: TypefiDocumentSettings

Property Listing

Property

Type

Access

Description

anchorAppearance

TypefiAnchorPreferences

readonly

Anchor appearance

counterFormatLanguage

TypefiCounterFormatLanguagePreferences

readonly

Counter format language

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

frameAppearance

TypefiFramePreferences

readonly

Frame appearance

hyperlinkAppearance

TypefiHyperlinkPreferences

readonly

Hyperlink appearance

isPaginationMode

Boolean

read/write

Used by the Typefi Engine to mark/unmark a document for the use for pagination

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

markerAppearance

TypefiMarkerPreferences

readonly

Marker appearance

paginationPreferences

TypefiPaginationPreferences

readonly

Pagination preferences

parent

Document

readonly

The parent of the TypefiDocumentSettings (a Document).

preferences

Preferences Preference

readonly

A collection of preferences objects.

properties

Object

read/write

A property that allows setting of several properties at the same time.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

TypefiElementAnchor createAnchor (storyOffset:InsertionPoint, elementInstance:Varies PageItem TypefiElementDefinition TypefiElementInstance TypefiElementVariantDefinition String, [externalId:String=String], [variantName:String=String])

Create a Typefi element anchor at the given position

Parameter

Type

Description

storyOffset

InsertionPoint

The location within the story, specified as an insertion point

elementInstance

PageItem

TypefiElementDefinition

TypefiElementInstance

TypefiElementVariantDefinition

String

A reference to a Typefi element definition or a reference to a Typefi element object. Can accept: TypefiElementInstance, PageItem, TypefiElementDefinition, TypefiElementVariantDefinition or String.

externalId

String

An optional string that acts as id. If not specified, a GUID is generated (Optional)

(default: )

variantName

String

Optional variant name (Optional)

(default: )

undefined createAssociation (elementAnchor:Varies TypefiElementAnchor PageItem, element:Varies PageItem TypefiElementPageItem, [anchorPoint:AnchorPoint=AnchorPoint])

Create an association between a Typefi element page item and a Typefi element anchor

Parameter

Type

Description

elementAnchor

TypefiElementAnchor

PageItem

The Typefi element anchor object. Can accept: TypefiElementAnchor or PageItem.

element

PageItem

TypefiElementPageItem

A page item or the Typefi element page item representation. Can accept: PageItem or TypefiElementPageItem.

anchorPoint

AnchorPoint

AnchorPoint.BOTTOM_CENTER_ANCHOR

AnchorPoint.BOTTOM_LEFT_ANCHOR

AnchorPoint.BOTTOM_RIGHT_ANCHOR

AnchorPoint.CENTER_ANCHOR

AnchorPoint.LEFT_CENTER_ANCHOR

AnchorPoint.RIGHT_CENTER_ANCHOR

AnchorPoint.TOP_CENTER_ANCHOR

AnchorPoint.TOP_LEFT_ANCHOR

AnchorPoint.TOP_RIGHT_ANCHOR

The optional anchor point to use in the element for the display of the line to the element anchor (Optional)

(default: AnchorPoint.CENTER_ANCHOR)

Story createTOC (using:TOCStyle, [replacing:Boolean=Boolean], fromBook:Book, placePoint:Array of Number String, [includeOverset:Boolean=Boolean], 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

Boolean

If true, replaces the existing TOC. (Optional)

(default: false)

fromBook

Book

The book whose documents to include in the TOC. (Optional)

placePoint

Array of Number

Array of String

The point at which to place the TOC story, specified as page coordinates in the format [x, y]. (Optional)

includeOverset

Boolean

If true, includes overset text TOC entries in the TOC. (Optional)

(default: false)

destinationLayer

Layer

The layer on which to place the TOC. (Optional)

TypefiDocumentSettings getElements ()

Resolves the object specifier, creating an array of object references.

String getFieldValue (name:String)

Get the value of a field of TypefiDocumentSettings

Parameter

Type

Description

name

String

The name of the field

String getMissingFonts ()

Get a possibly empty list of strings with missing font names

String getMissingLinks ()

Get a possibly empty list of strings with missing link file names

PageItem getNextFreeImageFrame (storyOffset:InsertionPoint)

Get the next free Typefi Image Frame object searching from the the given position

Parameter

Type

Description

storyOffset

InsertionPoint

The location within the story to start the search from, specified as an insertion point

undefined removeAssociation (elementAnchor:Varies TypefiElementAnchor PageItem, element:Varies PageItem TypefiElementPageItem)

Remove the association between a Typefi element page item and a Typefi element anchor

Parameter

Type

Description

elementAnchor

TypefiElementAnchor

PageItem

The Typefi element anchor object. Can accept: TypefiElementAnchor or PageItem.

element

PageItem

TypefiElementPageItem

A page item or the Typefi element page item representation. Can accept: PageItem or TypefiElementPageItem.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

undefined resetAllToDefaults ()

Reset the Typefi specific data of TypefiDocumentSettings to the default values

undefined setField (name:String, [value:Varies String LongInteger=Varies String LongInteger])

Set the value of a field of TypefiDocumentSettings

Parameter

Type

Description

name

String

The name of the field

value

String

LongInteger

The value of the field as string or as integer. The empty string will recompute the value of a counter field! If not specified, the field value will be reset. Can accept: String or Long Integer. (Optional)

(default: )

undefined setFirstPageNumber (startPageNumber:Number, [isStartDocument:Boolean=Boolean], [pageBinding:PageBindingOptions=PageBindingOptions])

Set the first page number of the document and optionally specify the page binding

Parameter

Type

Description

startPageNumber

Number (range 1 - 999999)

The first page number of the document

isStartDocument

Boolean

Set if the document is the first book document (Optional)

(default: false)

pageBinding

PageBindingOptions

PageBindingOptions.DEFAULT_VALUE

PageBindingOptions.LEFT_TO_RIGHT

PageBindingOptions.RIGHT_TO_LEFT

The optional page binding direction (Optional)

(default: PageBindingOptions.DEFAULT_VALUE)

String toSource ()

Generates a string which, if executed, will return the TypefiDocumentSettings.

String toSpecifier ()

Retrieves the object specifier.

Object of

Event.parent

EventListener.parent

MutationEvent.parent

Preference.parent

TypefiAnchorPreferences.parent

TypefiCounterFormatLanguagePreferences.parent

TypefiFramePreferences.parent

TypefiHyperlinkPreferences.parent

TypefiMarkerPreferences.parent

TypefiPaginationPreferences.parent

Document.typefiSettings

Return

TypefiDocumentSettings.getElements()