A document added to a book.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
| date | Date | readonly | The date and time the BookContent was created. |
| documentPageRange | string | readonly | The page range of the book content object within the book. |
| filePath | File | readonly | The full path to the file. |
| fullName | File | readonly | The full path to the BookContent, including the name of the BookContent. |
| id | number | readonly | The unique ID of the BookContent. |
| index | number | readonly | The index of the BookContent within its containing object. |
| label | string | r/w | A property that can be set to any string. |
| parent | Book | readonly | The parent of the BookContent (a Book). |
| properties | Object | r/w | A property that allows setting of several properties at the same time. |
| size | number | readonly | The size of the BookContent file. |
| status |
BookContentStatus
: NORMAL MISSING_DOCUMENT DOCUMENT_OUT_OF_DATE DOCUMENT_IN_USE DOCUMENT_IS_OPEN |
readonly | The status of the book content object file. |
Methods
string extractLabel (key:
string)
Gets the label value associated with the specified key.
| Parameter | Type | Description |
|---|---|---|
| key | string | The 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.
| Parameter | Type | Description |
|---|---|---|
| key | string | The key. |
| value | string | The value. |
BookContent
move ([to:
LocationOptions=AT_END][, reference:
BookContent])
Moves the book content object.
| Parameter | Type | Description |
|---|---|---|
| to | LocationOptions
: BEFORE AFTER AT_END AT_BEGINNING UNKNOWN |
The location relative to the reference object or within the book. (Optional) (default: AT_END) |
| reference | BookContent | The reference object. Note: Required when the to parameter specifies before or after. (Optional) |
void remove ()
Deletes the BookContent.
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.
| Parameter | Type | Description |
|---|---|---|
| using | File | The 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.
Used in:
Book.exportFile ( [to: File][, showingOptions: bool=false][, using: PDFExportPreset][, whichDocuments: Array of BookContent][, versionComments: string][, forceSave: bool=false])BookContent.move ( [to: LocationOptions=AT_END][, reference: BookContent])
BookContents.previousItem ( obj: BookContent)
BookContents.nextItem ( obj: BookContent)
Returned by:
Array of BookContent BookContent.getElements ( )BookContent BookContent.move ( [to: LocationOptions=AT_END][, reference: BookContent] )
BookContent BookContent.replace ( using: File )
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: any )
BookContent BookContents.itemByID ( id: number )
BookContent BookContents.itemByName ( name: string )
Array of BookContent BookContents.itemByRange ( from: any, to: any )
BookContent BookContents.lastItem ( )
BookContent BookContents.middleItem ( )
BookContent BookContents.nextItem ( obj: BookContent )
BookContent BookContents.previousItem ( obj: BookContent )