Book

A book.

Properties

Property Type Access Description
automaticDocumentConversion bool r/w If true, automatically converts the book content object during repagination and synchronization.
automaticPagination bool r/w If true, automatically updates page numbers when pages in book content files are added, deleted, or rearranged.
bookContents BookContents readonly A collection of book content objects.
filePath File readonly The full path to the file.
fullName File readonly The full path to the Book, including the name of the Book.
index number readonly The index of the Book within its containing object.
insertBlankPage bool r/w If true, inserts a blank page as necessary to fill in page number gaps caused by the odd or even specification set in the repagination option.
label string r/w A property that can be set to any string.
mergeIdenticalLayers bool r/w If true, merges identically named layers when exporting to PDF.
modified bool readonly If true, the Book has been modified since it was last saved.
name string readonly The name of the Book.
parent Application readonly The parent of the Book (a Application).
printPreferences PrintPreference readonly Print preference settings.
properties Object r/w A property that allows setting of several properties at the same time.
repaginationOption RepaginateOption :
NEXT_PAGE
NEXT_ODD_PAGE
NEXT_EVEN_PAGE
r/w Page numbering options for book content objects within the book.
saved bool readonly If true, the Book has not been saved since it was created.
styleSourceDocument any r/w Current master document. Can return: Document or BookContent.
synchronizeOptions SynchronizeOptions readonly A collection of synchronize option styles.

Methods

void close ([saving: SaveOptions=ASK][, savingIn: File][, versionComments: string][, forceSave: bool=false])
Close the Book

Parameter Type Description
saving SaveOptions :
NO
ASK
YES
Whether to save changes before closing the Book (Optional) (default: ASK)
savingIn File The file in which to save the Book (Optional)
versionComments string The comment for this version (Optional)
forceSave bool Forcibly save a version (Optional) (default: false)

void exportFile ([to: File][, showingOptions: bool=false][, using: PDFExportPreset][, whichDocuments: Array of BookContent][, versionComments: string][, forceSave: bool=false])
Exports the book to PDF.

Parameter Type Description
to File The file to which to export the book. (Optional)
showingOptions bool Used to specify if the PDF Export Options Dialog needs to be shown or not (Optional) (default: false)
using PDFExportPreset Used to specify the presets for the export which can be the object of the preset type, enumeration for existing presets or user defined presets, or a string naming the preset to be used, but in case Showing Options is true, the preset specified in the Export Dialog will over ride this parameter (Optional)
whichDocuments Array of BookContent Used to specify a list of book content references, from the current book, where the list may contain duplicate entries and if the list is not specified then the entire book contents shall be exported (Optional)
versionComments string The comment for this version. (Optional)
forceSave bool If true, forcibly saves a version. (Optional) (default: false)

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

Parameter Type Description
key string The key.

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

bool packageForPrint (to: File, copyingFonts: bool, copyingLinkedGraphics: bool, copyingProfiles: bool, updatingGraphics: bool, ignorePreflightErrors: bool, creatingReport: bool[, versionComments: string][, forceSave: bool=false])
Packages the document.

Parameter Type Description
to File The folder, alias, or path in which to place the packaged files.
copyingFonts bool If true, copies fonts used in the document to the package folder.
copyingLinkedGraphics bool If true, copies linked graphics files to the package folder.
copyingProfiles bool If true, copies color profiles to the package folder.
updatingGraphics bool If true, updates graphics links to the package folder.
ignorePreflightErrors bool If true, ignores preflight errors and proceeds with the packaging. If false, cancels the packaging when errors exist.
creatingReport bool If true, creates a package report that includes printing instructions, print settings, lists of fonts, links and required inks, and other information.
versionComments string The comments for the version. (Optional)
forceSave bool If true, forcibly saves a version. (Optional) (default: false)

void print ([printDialog: bool][, using: any])
Prints the Book(s).

Parameter Type Description
printDialog bool Whether to invoke the print dialog (Optional)
using PrinterPresetTypes
PrinterPreset
Printer preset to use. Can accept: PrinterPresetTypes enumerator or PrinterPreset. (Optional)

void repaginate ()
Repaginates the book.

void save ([to: File][, versionComments: string][, forceSave: bool=false])
Saves the book.

Parameter Type Description
to File The file path. Note: Required only if the book has not been previously saved. If the book has previously been saved, specifying a path saves a copy and closes the original book. (Optional)
versionComments string The comment for this version. (Optional)
forceSave bool If true, forcibly saves a version. (Optional) (default: false)

void synchronize ()
Synchronizes the entire book to the style source document.

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

string toSpecifier ()
Retrieves the object specifier.

void updateAllNumbers ()
Update all numbers (e.g. Page numbers, chapter numbers and paragraph numbers) throughout the book.

void updateChapterAndParagraphNumbers ()
Updates chapter numbers and paragraph numbers throughout the book.

Element of:

Application.activeBook
BookContent.parent
SynchronizeOption.parent

Used in:

Books.previousItem ( obj: Book)
Books.nextItem ( obj: Book)
Document.createTOC ( using: TOCStyle[, replacing: bool=false][, fromBook: Book][, placePoint: Array of number][, includeOverset: bool=false][, destinationLayer: Layer])

Returned by:

Array of Book Book.getElements ( )
Book Books.add ( fullName: File[, withProperties: Object] )
Book Books.anyItem ( )
Array of Book Books.everyItem ( )
Book Books.firstItem ( )
Book Books.item ( index: any )
Book Books.itemByName ( name: string )
Array of Book Books.itemByRange ( from: any, to: any )
Book Books.lastItem ( )
Book Books.middleItem ( )
Book Books.nextItem ( obj: Book )
Book Books.previousItem ( obj: Book )