Doubt in Book (.indb)

Hi All,
Requirement:
How can we use book concept (.indb). Actually i have script for override all master page item in the active Document only.
But I want to override all the BookContents in the active Book(.indb) (i.e., folio1.indd, folio2.indd, folio3.indd, folio4.indd, folio5.indd) see attachment.
Here is trying code:
For the single document only (working good):
var myDocument = app.activeDocument
var myPages = myDocument.pages;
for(i=0; i < myPages.length; i++) {
     OverrideMasterItems();
function OverrideMasterItems() {
  var allItems = myDocument.pages[i].appliedMaster.pageItems.everyItem().getElements();
  for(var j=0;j<allItems.length;j++){
    try{allItems[j].override(myDocument.pages[i])}
    catch(e){}
But my requirement is override all master page item through book(.indb)
Trying code is (not working):
//Over writing the master page elements through Book(.indb)
var myBook = app.books[0]
var myBookContents =app.books[0].bookContents.everyItem().getElements()
var myPages = myBookContents.pages;
for(i=0; i < myPages.length; i++) {
     OverrideMasterItems();
function OverrideMasterItems() {
  var allItems = myBook.pages[i].appliedMaster.pageItems.everyItem().getElements();
  for(var j=0;j<allItems.length;j++){
    try{allItems[j].override(myBook.pages[i])}
    catch(e){}
I am the beginner. Book Concept is entirely new for me. Please anyone give solution.
For Reference kindly see the attachment
Thanks in advance
BEGINNER_X

Hi Hans/All,
Thanks for your reply....
Using forum i got a script for open and close all the book contents. Its works fine.
Code is below (working good):
//Open all the Book Contents in the book
for( var i = app.activeBook.bookContents.length-1 ; i>=0 ; i--)
app.open (app.activeBook.bookContents[i].fullName, true)
////Close all the Book Contents in the book
for( var i = app.activeBook.bookContents.length-1 ; i>=0 ; i-- )
            app.open (app.activeBook.bookContents[i].fullName, false).close(SaveOptions.ASK);
But as per my requirement i want to open all the documents(bookContents) in the book, override all master page elements and close all the documents in the book
Trying Script is:
for( var i = app.activeBook.bookContents.length-1 ; i>=0 ; i-- )
            app.open (app.activeBook.bookContents[i].fullName, true)
            bookOverrideMasterItems ()
            app.open (app.activeBook.bookContents[i].fullName, false).close(SaveOptions.ASK);
function bookOverrideMasterItems()
    var myDocument = app.open (app.activeBook.bookContents[i].fullName, true);
    var myPages = myDocument.pages;
    for(i=0; i < myPages.length; i++) {
     OverrideMasterItems();
function OverrideMasterItems() {
  var allItems = myDocument.pages[i].appliedMaster.pageItems.everyItem().getElements();
  for(var j=0;j<allItems.length;j++){
    try{
        allItems[j].override(myDocument.pages[i]);
    catch(e){}
Please find the screenshot of error and my book(.indb)

Similar Messages

  • How to open a book.indb file at full size?

    I have a desktop shortcut that opens a book.indb file, which holds info for about 20+ chapters. But when the Book palette opens, it always shows just the first 8 chapters. I have to drag the bottom of the palette down to see the entire contents. It's not exactly a major issue, but is there a way to get the Book pallette to display its entire contents when it opens?
    Also, I've set up my WinXP PC so that all palettes open on the secondary monitor. When I re-open InDesign, it remembers the positions of each palette on the secondary monitor, with the exception of the Book palette. This one always opens on the primary monitor and I need to drag it over to the secondary monitor to get it out of the way. Again, no big deal but it would be nice if InDesign could remember where to place this palette.
    Any suggestions about the above?
    Thanks, John

    Hi,
    My theory is that Windows get confused when it is opening the program file and the following intsructions should create a unique copy. I have produced the instructions in detail because I am never sure how much people are use to - forgive me you know much of it.
    Open Windows or Folder Explorer
    Navigate to C:\Program Files (x86)\Adobe\Photoshop Elements 12
    Look for PhotoshopElementsEditor.exe
    Right click on the file and select Copy
    Right click on a blank space and select Paste - you should get a prompt asking if you want to continue - you do - this should produce a copy of the file
    Rename PhotoshopElementsEditor - Copy.exe to PSE 12 ED  - you should get a prompt asking if you want to continue - you do
    Close the Explorer
    In the Windows Control Panel, select Default Programs
    In Default Programs, Select Associate a file type … - it will take a while to display the list
    Scroll down to the type you want to select - say .jpg and select it
    Click on the Change program button
    Click on the Browse button
    Search for the PSE 12 ED file renamed in 6 above, select it and then click on the Open button
    Click on OK and close the Default Programs
    Now try your tests. I can get multiple files to open as well as retain Expert mode.
    Good luck
    Brian

  • IDCS3 Indexing book (indb) documents crashes InDesign

    InDesign crashes EVERY time I try to create an index in a book (indb) file. I open the document where I want the index, I open the indb file, i have even tried to open all the documents in the book. I am working on IDCS3 on WinXP Pro SP2. I am working on a dual core Xeon 2.33 MHz with 2 GB of RAM.

    yes i am...that was the first thing i checked...

  • IDCS3 Book (INDB) Format Questions

    Hello,
    I am a frequent InDesign user, but only beginning to learn the book (INDB) format, and have been unable to find postings/help modules on the following. Would anyone know whether it is possible to:
    1. Visually display/review/scroll a book (INDB) file within InDesign? Or is visual review (as opposed to viewing only a list of files in the book tab) possible only with standard INDD and printed/exported PDF files?
    2. Save/export an INDB file as a (single) INDD file? I understand that an INDB file can be packaged as a series of INDD files, but cannot find a way to create one aggregated INDD file. One workaround I can imagine would be if it were possible to combine INDD files in some streamlined way (as opposed to, e.g., cutting/pasting the contents of each page), but I don't know how to do that either, unfortunately.
    3. Create a book of books? In other words, can I combine two or more books easily, or is it necessary to re-add (and re-sequence) an entire series of individual INDD files?
    Yes/No answers perfectly OK, of course. However, if any "No" answers have logical explanations that might improve my understanding of the program, I am all ears. So to speak. Thanks. Peter

    > 1. Visually display/review/scroll a book (INDB) file within InDesign?
    An Indesign Book is just a listing of Indesign Documents. It's certainly
    possible to open some or all of the Indesign Documents through the Book
    window and scroll through the pages, but the Book itself won't show you
    the inside of each Document.
    > 2. Save/export an INDB file as a (single) INDD file?
    No. You can export the Book as one big PDF. But the Document files don't
    necessarily have to have the same styles, style definitions, master
    pages, chapter numbers, even the same page size. In order to combine
    documents, there would have to be some way to standardize these elements
    first.
    > 3. Create a book of books?
    No. Only Indesign Documents may be added to an Indesign Book. You can
    drag Documents from one Book to another.
    Kenneth Benson
    Pegasus Type, Inc.
    www.pegtype.com

  • Script to batch export multiple Books (.indb) to PDF

    I have multiple InDesign Book files that I would like to batch export to PDFs, respectively. (Not looking to combine multiple books into a single PDF. Just a 1 to 1 PDF export for each Book file.)
    In googling for an answer, I found Peter Kahrel's script for doing just this for other InDesign files, but it does not work for Books. http://www.kahrel.plus.com/indesign/batch_convert.html
    Does anyone know of a solution (paid or otherwise) for this process?  Opening up each Book and exporting to PDF from the ID menu takes quite a bit of time when doing this for several dozen files.
    Looking forward to any discussion to come up with a solution if one can be found... Mr. Kahrel's javascript file is a binary js file, so it can't be modified as is, and other solutions I've found around the web don't clearly state that they work with Book files or not.

    try below code
    before run script close all indb file
    var fileFilters = "InDesign:*.indb*";
    var myFolder = Folder.selectDialog ("choose Folder", fileFilters, false);
    var files = myFolder.getFiles("*.indb");
    for(i = 0; i < files.length; i++)
           var theDocument = app.open(File(files[i]), true);
             with ( theDocument ) {
                alert ( theDocument.name)
                 exportPdf(theDocument)
    function exportPdf(theDocument)
          myFilePath = myFolder + "/" +  theDocument.name + "_" + ".pdf";
            myFile = new File(myFilePath);
              theDocument.exportFile(ExportFormat.pdfType, myFile, false, app.pdfExportPresets.item('[Smallest File Size]'));
    theDocument.close(SaveOptions.no)

  • JavaScript to Synchronize the contents of a book (.indb)

    I'm new to programming and JavaScripting, I'm trying to learn, but I can't find a way to synchronize a book (all it's content). I would also like to set the first document in the book as the style Source document.
    So far this is my ridicules thinking.
    var bookSync = app.activeBook.bookContents;
    //var bookSource = bookSync.styleSourceDocument.id[0];
    bookSync.synchronizeObjectStyle;
    //bookSync.synchronizeMasterPage;
    Thank you!
    Tom

    Hi,
    You can develop a task into the portal that read all your repositories and get that information and then, to save this in another repository.
    Do you need help with this??
    Regards,
    Roberto

  • Indesign Crashing with .indb Book file

    Hi,
    I'm having an issue with using the Book pallette crashing InDesign every time I try to edit it.
    I've found many people having crashing issues on Mac OSX and with exporting to PDF but can't seem to find an instance of crashes due to Book files.
    Basically every time I try to delete, move, add a page to the Book (.indb file), InDesign will pop up a dialogue "Updating page an section numbers" and update the docs within the Book. This works as it should until I add one of my Chapters (largest chapter at: 26, 884 KB). It then proceeds to crash after trying to udate the book every time I try to edit it.
    I'm wondering if there is a Book size restriction or a Chapter size restriction, as the only real difference this chapter has is size. All the Chapters together equate 108, 450 KB, which I would have thought InDesign could handle, which makes me doubt that file size is the issue.
    The whole Book is only 98 pages.

    I used the Remove minor corruption by exportingon my other .indd docs and it reduced the file size dramatically in some cases. The reason being, I was saving chapters from a single consolidated document (53,136 KB), by copying the document then deleting pages. While the file size was reduced each time it must have retained unessessary information when deleting pages. I assume the solution mentioned must clear whatever unused cache is in the document, resulting in the file size shrinking.
    Example:
    Largest chapter at: 26, 884 KB was reduced to 16,888 KB
    2nd largest chapter at 25, 356 KB was reduced to 2,988 KB

  • InDesign crashes when syncing book with Hyperlinks in master

    Hi,
    I seem to have an issue with InDesign crashing when trying to sync a Book (INDB file) with page links (Hyperlinks) in the Master.
    Ref. Hyperlink panel > Edit Hyperlink > Link To: Page
    I've narrowed the crashing issue down to InDesign only crashing when the Style Source (containing the master with page links), tries to sync with another doc in the Book that uses the master in the Pages panel. Thus I do not get a crashing error if the doc does not contain the master in the Pages panel.
    For the pages that did not contain the master on the Pages panel I noticed that the Hyperlinks were labelled differently from the Style Source (ex. "hyperlink 1" from the Style Source would be "hyperlink 2" in the first document synced with it (assuming only one hyperlink present).
    If I remove the Hyperlinks (page links) from the master, the error no longer occurs for any of the pages.
    I put the links on the Page as opposed to the Master to test functionality and they work as expected. Although part of the reason for having the Master is these links appear exactly the same across multiple pages in the Book.
    I've tried to export all my pages as IDML files then re-save them as INDD files to no avail. Did the same to all the files as well with "Save As" which didn't do anything either. I then installed the latest patch I could find: Application Version 7.0.4.553 (See all InDesign Patches), which also did not work.
    Not sure if this is a bug or if what I'm trying to accomplish should be done differently.
    The links in the Master need to link to the first page of select docs in the Book. Similar functionality to how a rendered table of contents would behave.
    Ref. Layout > Table of Contents...

    I had the same problem, and it turns out that the problem is having the same file into different folders. For example I had an MP4 in iTunes, and the same file in the photos folder that was being updated to the iPad. So I just removed one file and it syncs perfectly.

  • Table of contents file not taking book files into account

    Hi everyone,
    I've used Indesign's book panel to manage the chapters in a book that I've typeset. I set up the table of contents style (in a TOC document which is part of the books panel) and made sure that it used all the book chapters when compiling the table of contents by checking the option in the TOC styles diaglogue box.
    For some reason, the table of contents is ignoring all of the styles in the chapter files so it's not including anything in the table of contents other than a few headings that are within the file that contains the table of contents.
    I'm noticing that Indesign is creating a whole lot of duplicate files with a string of numbers appended to the file name, eg.
    Newbook_Cha531549083577
    These seem to duplicates of the chapter files but I have no idea why Indesign is creating them so I'm wondering whether I've got some corruption happening and whether this may be causing the problem with the table of contents.
    Has anyone had a similar problem and if yes, is there any solution?
    Really appreciate any advice.

    Peter,
    I'm having the same problem as gwh. The TOC won't go beyond the first document. All my style names are the same. I don't have style groups.
    To make the book I began with one long document that included all the chapters. I broke it into chapters by copying and pasting into new .indd documents (each one created by Save As from the first) and adding all those documents to the book.
    Generating the TOC from the one long .indd document works perfectly. I just can't get it to generate from the book (.indb) doc.
    I have all the documents in the book open. I have the first one active (in front). I generate the TOC, and I get only the entries for the first document. Here's a screenshot of my TOC box. I must be missing something really simple, huh?  (I'm using CS5)

  • Incorrect images from .indb file export to ePub in Indesign CS6

    I am having problems exporting images to ePub and get a different result from the same file depending on whether I export directly from the .indd file or from the .indb file.
    When I export to ePub from the individual chapter (.indd) file, everything is fine and the images appear in the correct locations where they have been anchored.
    When I export via the book  (.indb) file, images are being replaced with the incorrect file in the resulting ePub.
    Looking at the HTML, it seems not all images are being exported from the .indb file and when the image is missing, Indesign is substituting the next available image from the alphabetical list in the images folder so I'm getting incorrect images peppered throughout the book.
    Any idea where I've gone wrong and how to fix it? I've produced several ePubs with images and never come across this before.
    More details on how I've set up the files and any other info I think might be relevant below if needed.
    - I'm using Indesign CS6 (8.0.1)
    - I'm producing an 11 chapter book.
    - Each chapter is a separate .indd file for ease of editing.
    - These 11 files have been added to an .indb file for export to ePub.
    - Images are all anchored to their captions within the text.
    - On Export to ePub settings for images I have selected to insert a page break before the image and that settings apply to anchopred objects.
    Nothing else is selected (I don't want to preserve appearance from layout.)
    - I'm using the Articles panel feature for order of content.
    - In the original file supplied, the images were placed as .tiff images. I saved them to jpeg and relinked them using the "relink to folder" and "match same file but this extension" options.
    - No links are flagged as missing.
    Any help much appreciated.

    The solution points to how, it appears, the book panel export is functioning: each file exports a set of tags referenced to itself; file01 adds a "1" to its tags, and so forth. What I was able to do was use a file referencing all of the tags in the style suite in two ways:
    first, I exported to an epub the single file, creating a fairly clean CSS, which I then extracted and renamed;
    then, making certain that file was the "source" file in the book panel, I mapped for export all of the tags, being careful to be certain each tag/class combo was same as in renamed clean CSS;
    I synchronized the whole shebang;
    I exported to epub, adding my clean CSS as an external style sheet, selecting only "include embeddable fonts".
    Bingo!

  • Copies of Indesign books works different on MAC and PC ?

    Hello everyone,
    i try to follow many discussion about how to create a clean copy of an Indesign book indb (with different chapters which are individual indesign files)  with no link to the old one.
    I found many tricks like changing the name of the original folder or packaging the book for print, but i'm not really satisfy by this way. 
    The first way forced me to change the name of the original file each time i want to make a clean copy and the second way  will not keep the structure of my folder and subfolders which are not included in the package.
    It seems the real concern is more about how Indesign is able to manage absolute and relative path, and i also found some people asking Indesign only works with absolute path.
    But, after many trials on Mac and PC, i was so surprised to check that on my MAC, thinks are working very well, when i make a copy of the original book folder exactly in the same location, the copy is not linked to the original file (that's what i want) !!!
    But on PC it doesn't, the copy of the book is still linked to the original files.
    Can someone tell  me the difference between MAC and PC ?
    Is it an option in Indesign to change that ? or is it related to th OS file system ?
    Thanks a lot.
    Daté

    Hi Peter,
    I  opened the two books in indesign to compare the paths of the files in the books.
    I just simply move the mouse over the indesign file in the book panel to check the path that appears in the yellow tooltip.
    For example :
    for the original BOOK_TECH.indb, the path of the file Trims.indd in the DOC_TECH folder is : /Users/UserName/Documents/DOC_TECH/MAIN_FILES/Trims.indd
    for the copy BOOK_TECH.indb, the path of the file Trims.indd in the DOC_TECH2 folder is : /Users/UserName/Documents/DOC_TECH2/MAIN_FILES/Trims.indd
    Another way to be sure of what i'm saying here is to open the file trims.indd in the original book and the same file in the copy. You will get 2 different files opened in Indesign with the same name of course.
    I also try with a Mac book pro running MAC OS X 10.6.5, but it doesn't work (you will get the link to the original one). It seems to work or not, depending the OS
    i'm curious to know why it is working on MacOS x 10.9 and not 10.6 and windows. Maybe there is a way to fix it with the OS settings ?
    If you have the right answer, just let me know, because it could help a lot of people.
    Thanks a lot.
    Daté

  • Is there an easy way to make a long chapter into a book with many chapters?

    I have a long, book length text file (50 chapters). It's one file in one ID chapter. I would like to make it 50 files in 50 ID chapters in one book (indb). Can that be easily done?
    Thanks

    You can "move the pages" which make one chapter in your ID file in the new documents and then save the new file, similarly you can do it for the 50 chapters and then compile this 50 chapters together in a book.

  • Linking between books for PDF export

    Does anyone have any suggestions as to how to go about setting up links between books in such a way that they'll export to PDF? Here's my scenario: I have two books (indb files with many indd files each). One of the books needs to link to text anchors I've set up in the other. However, linking between the files doesn't work because each book is exported as a single PDF. I had planned to merge the files of the book that is being linked to prior to creating the links, but no matter what I try, Move Pages causes reflow (and given the length and intricacy of the documents I'm sure it's not worth the time to try to fix the reflow; I'd be better off linking the PDF by hand).
    Is this just not a possible workflow? I considered linking to a 'dummy' file that was named like my second book is named, but from what I can tell ID doesn't really export the text anchors in any usable fashion; you either get the links when you export or you can't massage them into being. Any advice would be appreciated.

    This is an interesting suggestion, but I'm not sure how it would work. I've tried outputting one PDF from this combo-indb file and then extracting the pages out into separate PDFs, but the links are lost. I've also tried selecting just the files from each of the actual books within the combo-indb and exporting PDFs for each one, but in that case it assumes it's looking for an anchor within the same PDF. Did you have another approach in mind?

  • ID CS5.5 book creates weird page flow in PDF

    I am using ID version 7.5.2 and Acrobat 9 Pro Extended (version 9.5.0).
    I created an InDesign book (indb) that condains an indd file for each chapter. There are about 20 chapters so far, typically 4 to 7 pages each. The documents all use the same 2-page spread. The page numbering is automatic. And the document setup dialog has "facing pages" checked.
    When I use the default preset in the File menu to create a PDF (using all default settings, no changes in the dialog), it successfully creates the PDF, but the flow of pages is not as expected. Specifically, Acrobat and Reader seem to be treating each 2-page spread (when in the same indd file) as a page. With Page Display set to "Single Page View," Reader shows me page one alone and then pages 2 and 3 side by side. And so on, so that whenever a 2-page spread is from a single indd file, Reader treats them as one page. And when pages which should face each other are from different indd files, they appear separately, one below the other.
    Other types of Page Display settings give similar weird behavior. For example, "Two Page View" might show pages 20 and 21 as the left page and pages 22 and 23 as the right page as long as all of that content comes from the same indd file.
    Any ideas about what I'm doing wrong? Or, alternatively, is there anything I can do in the full Acrobat to get the display behavior back to the usual facing-page format?
    Note that I have been using ID for many years, but have not used the Book feature (indb file) recently. I'm using the Book feature this time because I plan to create an EPUB and I understand that the easiest way to force each chapter to start at the top of a page is to put each chapter in its own indd within a book.
    Thanks in advance for any assistance.
    John

    Thanks, Peter and Rik,
    With your help it's working 90% correctly. I didn't notice at the bottom of the dialog where I'm asked for the file name to save as that it was defaulting to PDF (Interactive). Once I changed it to PDF (Print), I started seeing consistent 2-page spreads in Reader/Acrobat when I set Page Display to 2-page.
    One small step to go. I'd like to see all odd-numbered pages on the right, as in a printed book (even though that means the first spread in Reader will have no page on the left). That behavior will put the page numbers at the outside edge and not near the gutter.
    I've tried setting "Next Odd" in the Book Page Numbering Options dialog but, as expected, that made every chapter begin on an odd-numbered page. I just want the first indd to start on an odd page.
    I've also tried toggling the Spreads checkbox and the Facing Pages checkbox, but changes there only make matters worse.
    Bottom line: where can I tell InDesign (or Acrobat, if necessary) to always show page 1 and all odd-numbered pages on the right when Reader is in 2-page display mode?

  • Chapter names in .indb

    When adding documents to an InDesign book (.indb) and then exporting the book for Digital Editions, the resulting epub's table of contents (.ncx) name the chapters whatever the file name for that chapter was.
    How can I change the name of the chapter in the epub without changing the file name without actually unzipping the epub and doing it manually?  This is part of an automated process, and changing the names in the toc.ncx file isn't really an option.  Is there a way to use the document data instead of just the file name?
    Ideally this would all be automated with JavaScript, but if anyone has any idea how to do this at all, it'd be much appreciated.  Thanks!

    You have to generate a TOC in InDesign. Export will read this.

Maybe you are looking for