Book

A book.

Methods:

close, exportFile, extractLabel, getElements, insertLabel, packageForPrint, preflight, print, repaginate, save, synchronize, toSource, toSpecifier, updateAllCrossReferences, updateAllNumbers, updateChapterAndParagraphNumbers

Objects:

BookContent, BookContents, Boolean, Document, File, Number, Object, PreflightBookOption, PrintPreference, RepaginateOption, SmartMatchOptions, String,

Preferences:

PreflightBookOption, PrintPreference

Property Listing

Property

Type

Access

Description

automaticDocumentConversion

Boolean

read/write

If true, automatically converts the book content object during repagination and synchronization.

automaticPagination

Boolean

read/write

If true, automatically updates page numbers when pages in book content files are added, deleted, or rearranged.

bookContents

BookContents BookContent

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

Boolean

read/write

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.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

label

String

read/write

A property that can be set to any string.

mergeIdenticalLayers

Boolean

read/write

If true, merges identically named layers when exporting to PDF.

modified

Boolean

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).

preflightBookOptions

PreflightBookOption

readonly

Preflight book option settings.

printPreferences

PrintPreference

readonly

Print preference settings.

properties

Object

read/write

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

repaginationOption

RepaginateOption

RepaginateOption.NEXT_EVEN_PAGE

RepaginateOption.NEXT_ODD_PAGE

RepaginateOption.NEXT_PAGE

read/write

Page numbering options for book content objects within the book.

saved

Boolean

readonly

If true, the Book has been saved since it was created.

smartMatchStyleGroups

SmartMatchOptions

SmartMatchOptions.MATCH_STYLE_NAME

SmartMatchOptions.MATCH_STYLE_PATH

read/write

How to match styles with same name while synchronizing a book.

styleSourceDocument

Document

BookContent

read/write

Current style source document. Can return: Document or BookContent.

synchronizeBulletNumberingList

Boolean

read/write

If true, synchronize bullets and numbering.

synchronizeCellStyle

Boolean

read/write

If true, synchronize cell styles.

synchronizeCharacterStyle

Boolean

read/write

If true, synchronize character styles.

synchronizeConditionalText

Boolean

read/write

If true, synchronize conditional text.

synchronizeMasterPage

Boolean

read/write

If true, synchronize master pages.

synchronizeObjectStyle

Boolean

read/write

If true, synchronize object styles.

synchronizeParagraphStyle

Boolean

read/write

If true, synchronize paragraph styles.

synchronizeSwatch

Boolean

read/write

If true, synchronize swatches.

synchronizeTableOfContentStyle

Boolean

read/write

If true, synchronize table of content styles.

synchronizeTableStyle

Boolean

read/write

If true, synchronize table styles.

synchronizeTextVariable

Boolean

read/write

If true, synchronize text variables.

synchronizeTrapStyle

Boolean

read/write

If true, synchronize trap styles.

Method Listing

undefined close ([saving:SaveOptions=SaveOptions], savingIn:File, versionComments:String, [forceSave:Boolean=Boolean])

Close the Book

Parameter

Type

Description

saving

SaveOptions

SaveOptions.ASK

SaveOptions.NO

SaveOptions.YES

Whether to save changes before closing the Book (Optional)

(default: SaveOptions.ASK)

savingIn

File

The file in which to save the Book (Optional)

versionComments

String

The comment for this version (Optional)

forceSave

Boolean

Forcibly save a version (Optional)

(default: false)

undefined exportFile (to:File, [showingOptions:Boolean=Boolean], using:PDFExportPreset, whichDocuments:Array of BookContent, versionComments:String, [forceSave:Boolean=Boolean])

Exports the book to PDF.

Parameter

Type

Description

to

File

The file to which to export the book. (Optional)

showingOptions

Boolean

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

Boolean

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.

Book getElements ()

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

undefined 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.

Boolean packageForPrint (to:File, copyingFonts:Boolean, copyingLinkedGraphics:Boolean, copyingProfiles:Boolean, updatingGraphics:Boolean, includingHiddenLayers:Boolean, ignorePreflightErrors:Boolean, creatingReport:Boolean, versionComments:String, [forceSave:Boolean=Boolean])

Packages the document.

Parameter

Type

Description

to

File

The folder, alias, or path in which to place the packaged files.

copyingFonts

Boolean

If true, copies fonts used in the document to the package folder.

copyingLinkedGraphics

Boolean

If true, copies linked graphics files to the package folder.

copyingProfiles

Boolean

If true, copies color profiles to the package folder.

updatingGraphics

Boolean

If true, updates graphics links to the package folder.

includingHiddenLayers

Boolean

If true, copies fonts and links from hidden layers to the package.

ignorePreflightErrors

Boolean

If true, ignores preflight errors and proceeds with the packaging. If false, cancels the packaging when errors exist.

creatingReport

Boolean

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

Boolean

If true, forcibly saves a version. (Optional)

(default: false)

undefined preflight (to:File, [autoOpen:Boolean=Boolean])

Preflight a book and optionally save the resulting report.

Parameter

Type

Description

to

File

The preflight report to save to. (Optional)

autoOpen

Boolean

If true, automatically open the report after creation. (Optional)

(default: false)

undefined print (printDialog:Boolean, using:Varies PrinterPresetTypes PrinterPreset)

Prints the Book(s).

Parameter

Type

Description

printDialog

Boolean

Whether to invoke the print dialog (Optional)

using

PrinterPresetTypes

PrinterPresetTypes.CUSTOM

PrinterPresetTypes.DEFAULT_VALUE

PrinterPreset

Printer preset to use. Can accept: PrinterPresetTypes enumerator or PrinterPreset. (Optional)

undefined repaginate ()

Repaginates the book.

undefined save (to:File, versionComments:String, [forceSave:Boolean=Boolean])

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

Boolean

If true, forcibly saves a version. (Optional)

(default: false)

undefined 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.

undefined updateAllCrossReferences ()

Updates the cross references in the entire book.

undefined updateAllNumbers ()

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

undefined updateChapterAndParagraphNumbers ()

Updates chapter numbers and paragraph numbers throughout the book.

Object of

Application.activeBook

BookContent.parent

PreflightBookOption.parent

PrintPreference.parent

Return

Books.add()

Book.getElements()

Books.anyItem()

Books.everyItem()

Books.nextItem()

Books.previousItem()

Books.item()

Books.[]()

Books.itemByName()

Books.itemByRange()

Books.firstItem()

Books.lastItem()

Books.middleItem()