BookBookContent

A document added to a book.

Instance Properties

Name Description Access
date Date The date and time the BookContent was created. read-only
documentPageRange string The page range of the book content object within the book. read-only
eventListeners EventListeners A collection of event listeners. read-only
events Events A collection of events. read-only
filePath File The full path to the file. read-only
fullName File The full path to the BookContent, including the name of the BookContent. read-only
id number The unique ID of the BookContent. read-only
index number The index of the BookContent within its containing object. read-only
isValid bool Returns true if the object specifier resolves to valid objects. read-only
label string A property that can be set to any string. read-write
name string The name of the BookContent. read-only
parent Book The parent of the BookContent (a Book). read-only
properties Object A property that allows setting of several properties at the same time. read-write
size number The size of the BookContent file. read-only
status BookContentStatus The status of the book content object file. read-only

Methods

addEventListener(
eventType, handler ​[, captures])
 → EventListener
extractLabel(
key)
 → string
insertLabel(
key, value)
move(
[to] ​[, reference])
 → BookContent
preflight(
[to] ​[, autoOpen])
remove(
)
removeEventListener(
eventType, handler ​[, captures])
 → bool
replace(
using)
 → BookContent
toSource(
)
 → string
toSpecifier(
)
 → string
addEventListener(
eventType, handler ​[, captures=false])
 → EventListener
Adds an event listener.
eventType string The event type.
handler The event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
extractLabel(
key)
 → string
Gets the label value associated with the specified key.
key string The key.
getElements(
)
 → BookContent
Resolves the object specifier, creating an array of object references.
insertLabel(
key, value)
Sets the label to the value associated with the specified key.
key string The key.
value string The value.
move(
[to=LocationOptions.AT_END] ​[, reference])
 → BookContent
Moves the book content object.
to LocationOptions The location relative to the reference object or within the book. (Optional)
reference BookContent The reference object. Note: Required when the to parameter specifies before or after. (Optional)
preflight(
[to] ​[, autoOpen=false])
Preflight a book content object and optionally save the resulting report.
to File The preflight report to save to. (Optional)
autoOpen bool If true, automatically open the report after creation. (Optional)
remove(
)
Deletes the BookContent.
removeEventListener(
eventType, handler ​[, captures=false])
 → bool
Removes the event listener.
eventType string The registered event type.
handler The registered event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
replace(
using)
 → BookContent
Replaces a book content object with a new file. Note: If the new file replaces the current style source document, the new file becomes the style source document.
using File The full path name of the new book content object.
synchronize(
)
Matches the formatting of the book content object to the style source document.
toSource(
)
 → string
Generates a string which, if executed, will return the BookContent.
toSpecifier(
)
 → string
Retrieves the object specifier.