Book
A book.
Go to Property Listing | Method Listing
Methods:
addEventListener, close, exportFile, extractLabel, getElements, insertLabel, packageForPrint, preflight, print, removeEventListener, repaginate, save, synchronize, toSource, toSpecifier, updateAllCrossReferences, updateAllNumbers, updateChapterAndParagraphNumbers
Objects:
BookContent, BookContents, Boolean, Document, EPubExportPreference, EPubFixedLayoutExportPreference, EventListeners, Events, File, Number, Object, Preferences, PreflightBookOption, PrintPreference, RepaginateOption, SmartMatchOptions, String,
Preferences:
EPubExportPreference, EPubFixedLayoutExportPreference, Preferences, PreflightBookOption, PrintPreference
Property Listing
Property |
Type |
Access |
Description |
---|---|---|---|
read/write |
If true, automatically converts the book content object during repagination and synchronization. |
||
read/write |
If true, automatically updates page numbers when pages in book content files are added, deleted, or rearranged. |
||
readonly |
A collection of book content objects. |
||
readonly |
EPub export preference settings. |
||
readonly |
EPub fixed layout export preference settings. |
||
readonly |
A collection of event listeners. |
||
readonly |
A collection of events. |
||
readonly |
The full path to the file. |
||
readonly |
The full path to the Book, including the name of the Book. |
||
readonly |
The index of the Book within its containing object. |
||
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. |
||
readonly |
Returns true if the object specifier resolves to valid objects. |
||
read/write |
A property that can be set to any string. |
||
read/write |
If true, merges identically named layers when exporting to PDF. |
||
readonly |
If true, the Book has been modified since it was last saved. |
||
readonly |
The name of the Book. |
||
readonly |
The parent of the Book (a Application). |
||
readonly |
A collection of preferences objects. |
||
readonly |
Preflight book option settings. |
||
readonly |
Print preference settings. |
||
read/write |
A property that allows setting of several properties at the same time. |
||
read/write |
Page numbering options for book content objects within the book. |
||
readonly |
If true, the Book has been saved since it was created. |
||
read/write |
How to match styles with same name while synchronizing a book. |
||
read/write |
Current style source document. Can return: Document or BookContent. |
||
read/write |
If true, synchronize bullets and numbering. |
||
read/write |
If true, synchronize cell styles. |
||
read/write |
If true, synchronize character styles. |
||
read/write |
If true, synchronize conditional text. |
||
read/write |
If true, synchronize cross reference formats |
||
read/write |
If true, synchronize master pages. |
||
read/write |
If true, synchronize object styles. |
||
read/write |
If true, synchronize paragraph styles. |
||
read/write |
If true, synchronize swatches. |
||
read/write |
If true, synchronize table of content styles. |
||
read/write |
If true, synchronize table styles. |
||
read/write |
If true, synchronize text variables. |
||
read/write |
If true, synchronize trap styles. |
Method Listing
EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])
Adds an event listener.
Parameter |
Type |
Description |
---|---|---|
eventType |
The event type. |
|
handler |
JavaScriptFunction |
The event handler. Can accept: File or JavaScript Function. |
captures |
This parameter is obsolete. (Optional) (default: false) |
undefined close ([saving:SaveOptions=SaveOptions], savingIn:File, versionComments:String, [forceSave:Boolean=Boolean])
Close the Book
Parameter |
Type |
Description |
---|---|---|
saving |
Whether to save changes before closing the Book (Optional) (default: SaveOptions.ASK) |
|
savingIn |
The file in which to save the Book (Optional) |
|
versionComments |
The comment for this version (Optional) |
|
forceSave |
Forcibly save a version (Optional) (default: false) |
undefined exportFile (format:Varies ExportFormat String, to:File, [showingOptions:Boolean=Boolean], using:PDFExportPreset, whichDocuments:Array of BookContent, versionComments:String, [forceSave:Boolean=Boolean])
Exports the book to a file.
Parameter |
Type |
Description |
---|---|---|
format |
The export format, specified as an enumeration value or as an extension that appears in the Save as type or Format menu in the Export dialog. Can accept: ExportFormat enumerator or String. |
|
to |
The file to which to export the book. (Optional) |
|
showingOptions |
Used to specify if the PDF Export Options Dialog needs to be shown or not (Optional) (default: false) |
|
using |
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 |
The comment for this version. (Optional) |
|
forceSave |
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 |
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.
Boolean packageForPrint (to:File, copyingFonts:Boolean, copyingLinkedGraphics:Boolean, copyingProfiles:Boolean, updatingGraphics:Boolean, includingHiddenLayers:Boolean, ignorePreflightErrors:Boolean, creatingReport:Boolean, includeIdml:Boolean, includePdf:Boolean, pdfStyle:String, useDocumentHyphenationExceptionsOnly:Boolean, versionComments:String, [forceSave:Boolean=Boolean])
Packages the document.
Parameter |
Type |
Description |
---|---|---|
to |
The folder, alias, or path in which to place the packaged files. |
|
copyingFonts |
If true, copies fonts used in the document to the package folder. |
|
copyingLinkedGraphics |
If true, copies linked graphics files to the package folder. |
|
copyingProfiles |
If true, copies color profiles to the package folder. |
|
updatingGraphics |
If true, updates graphics links to the package folder. |
|
includingHiddenLayers |
If true, copies fonts and links from hidden layers to the package. |
|
ignorePreflightErrors |
If true, ignores preflight errors and proceeds with the packaging. If false, cancels the packaging when errors exist. |
|
creatingReport |
If true, creates a package report that includes printing instructions, print settings, lists of fonts, links and required inks, and other information. |
|
includeIdml |
If true, generates and includes IDML in the package folder. (Optional) |
|
includePdf |
If true, generates and includes PDF in the package folder. (Optional) |
|
pdfStyle |
If specified and PDF is to be included, use this style for PDF export if it is valid, otherwise use the last used PDF preset. (Optional) |
|
useDocumentHyphenationExceptionsOnly |
If this option is selected, InDesign flags this document so that it does not reflow when someone else opens or edits it on a computer that has different hyphenation and dictionary settings. (Optional) |
|
versionComments |
The comments for the version. (Optional) |
|
forceSave |
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 |
The preflight report to save to. (Optional) |
|
autoOpen |
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 |
Whether to invoke the print dialog (Optional) |
|
using |
Printer preset to use. Can accept: PrinterPresetTypes enumerator or PrinterPreset. (Optional) |
Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])
Removes the event listener.
Parameter |
Type |
Description |
---|---|---|
eventType |
The registered event type. |
|
handler |
JavaScriptFunction |
The registered event handler. Can accept: File or JavaScript Function. |
captures |
This parameter is obsolete. (Optional) (default: false) |
undefined repaginate ()
Repaginates the book.
undefined save (to:File, versionComments:String, [forceSave:Boolean=Boolean])
Saves the book.
Parameter |
Type |
Description |
---|---|---|
to |
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 |
The comment for this version. (Optional) |
|
forceSave |
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
EPubExportPreference.parent
EPubFixedLayoutExportPreference.parent
Event.parent
EventListener.parent
MutationEvent.parent
Preference.parent
PreflightBookOption.parent
PrintPreference.parent