Class

BookContent

 A document added to a book.

QuickLinks

addEventListener, extractLabel, getElements, insertLabel, move, preflight, remove, removeEventListener, replace, synchronize, toSource, toSpecifier

Hierarchy

Book
BookContent
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
dateDate readonlyThe date and time the BookContent was created.
documentPageRangestring readonlyThe page range of the book content object within the book.
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
filePathFile readonlyThe full path to the file.
fullNameFile readonlyThe full path to the BookContent, including the name of the BookContent.
idnumber readonlyThe unique ID of the BookContent.
indexnumber readonlyThe index of the BookContent 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 readonlyThe name of the BookContent.
parentBook readonlyThe parent of the BookContent (a Book).
propertiesObject r/wA property that allows setting of several properties at the same time.
sizenumber readonlyThe size of the BookContent file.
statusBookContentStatus:
BookContentStatus.NORMAL
BookContentStatus.MISSING_DOCUMENT
BookContentStatus.DOCUMENT_OUT_OF_DATE
BookContentStatus.DOCUMENT_IN_USE
BookContentStatus.DOCUMENT_IS_OPEN
readonlyThe status of the book content object file.

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)

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

ParameterTypeDescription
keystringThe key.

Array of BookContent 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.

BookContent move ([to: LocationOptions=LocationOptions.AT_END][, reference: BookContent])
Moves the book content object.

ParameterTypeDescription
toLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The location relative to the reference object or within the book. (Optional) (default: LocationOptions.AT_END)
referenceBookContentThe reference object. Note: Required when the to parameter specifies before or after. (Optional)

void preflight ([to: File][, autoOpen: bool=false])
Preflight a book content object and optionally save the resulting report.

ParameterTypeDescription
toFileThe preflight report to save to. (Optional)
autoOpenboolIf true, automatically open the report after creation. (Optional) (default: false)

void remove ()
Deletes the BookContent.

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)

BookContent replace (using: File)
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.

ParameterTypeDescription
usingFileThe full path name of the new book content object.

void synchronize ()
Matches the formatting of the book content object to the style source document.

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

string toSpecifier ()
Retrieves the object specifier.

Element of

Book.styleSourceDocument

Used in:

void Book.exportFile (format: varies[, to: File][, showingOptions: bool=false][, using: PDFExportPreset][, whichDocuments: Array of BookContent][, versionComments: string][, forceSave: bool=false])

BookContent BookContent.move ([to: LocationOptions=LocationOptions.AT_END][, reference: BookContent])

BookContent BookContents.nextItem (obj: BookContent)

BookContent BookContents.previousItem (obj: BookContent)

Return

Array of BookContent BookContent.getElements ()

BookContent BookContent.move ([to: LocationOptions=LocationOptions.AT_END][, reference: BookContent])

BookContent BookContent.replace (using: File)

BookContent BookContents.[] (index: number)

BookContent BookContents.add (fullName: File[, at: number=-1][, withProperties: Object])

BookContent BookContents.anyItem ()

Array of BookContent BookContents.everyItem ()

BookContent BookContents.firstItem ()

BookContent BookContents.item (index: varies)

BookContent BookContents.itemByID (id: number)

BookContent BookContents.itemByName (name: string)

Array of BookContent BookContents.itemByRange (from: varies, to: varies)

BookContent BookContents.lastItem ()

BookContent BookContents.middleItem ()

BookContent BookContents.nextItem (obj: BookContent)

BookContent BookContents.previousItem (obj: BookContent)

Jongware, 28-Apr-2012 v3.0.3hContents :: Index