CharacterStyles of a document inside an InDesign book

How do I list the characterStyles of a document that is inside a book without opening the document?  This is my script:
    app.open (book_contents[0], false);
    var charStylesDD =app.documents.item(0).characterStyles.everyItem().name;
    app.documents.item(0).close (SaveOptions.no);     
It works but this happens before a window is opened, as you might imagine it may take a long time and users might think the script did not run.  If I remove the app.open part, the value of charStylesDD is undefined.
I need something like:
book.bookContents.everyItem().characterStyles.everyItem.name;
But unfortunately book.bookContents does not have the characteStyles function.
Any help would be appreciated.  Thanks guys! 

No, Javascript doesn't allow access to the raw file. You absolutely need to open it first in InDesign.

Similar Messages

  • How to convert a large document into a InDesign Book w/Chapters?

    Hello!
    I just started a position with a company that has a number of catalogs full of the widgets they sell. Previously the catalog work was outsourced to a company that uses Quark, and the first thing I did when I started was to convert them to InDesign using a 3rd party plugin.
    The one I'm working on now is 400+ pages, including a TOC and 2 indexes (words / item nos.), and is currently 4 VERY large files that take 5-10 minutes each to open.
    What I'd like to do is split the entire catalog along logical lines into a bunch of 10-50 page documents, then stitch them all back together as Chapters in a Book file. The plan is to have the smaller documents be usable either as stand-alone brochures or as pieces of the big catalog. Once I can get it all organized the way I want, I'll be redoing the TOC and indexes as well.
    So, to boil it down to a few questions:
    1. How do I split a large document into smaller pieces?
    2. I have a basic understanding of creating a Book file, but are there any pitfalls I should watch out for when stitching the bits back together?
    3. Is it possible to have page numbering automated so that if I open a chapter on its own the pages will be, say, 1-20; but if I open it in the context of the book file the pages will be, say, 84-104?
    4. Are the page numbering, TOC, and indexing tools flexible enough to where if I modify a section such that it adds or removes pages in that section, the entire book file will restructure to accommodate?
    A thousand thanks in advance to all who read this, and to any who respond!

    S_Atwood wrote:
    Hello!
    I just started a position with a company that has a number of catalogs full of the widgets they sell. Previously the catalog work was outsourced to a company that uses Quark, and the first thing I did when I started was to convert them to InDesign using a 3rd party plugin.
    The one I'm working on now is 400+ pages, including a TOC and 2 indexes (words / item nos.), and is currently 4 VERY large files that take 5-10 minutes each to open.
    What I'd like to do is split the entire catalog along logical lines into a bunch of 10-50 page documents, then stitch them all back together as Chapters in a Book file. The plan is to have the smaller documents be usable either as stand-alone brochures or as pieces of the big catalog. Once I can get it all organized the way I want, I'll be redoing the TOC and indexes as well.
    So, to boil it down to a few questions:
    1. How do I split a large document into smaller pieces?
    Saving x-number of copies as new names, then chop off the unwanted parts is pretty efficient.
    2. I have a basic understanding of creating a Book file, but are there any pitfalls I should watch out for when stitching the bits back together?
    Nothing specific, other than learning the ins and outs of working with book files. For example, if you change a style in one file, you'd want to use the Synchronize feature to propagate the change to the other files, but you'd also need to remember if any change in one file shouldn't be propagated to others, and deselect it in the Synchronize dialog box.
    It's a good idea to open all and save all book files before doing any book-wide operation; even better to save the whole directory for safety. Working on open  files gives you some undo powers that working with closed files doesn't.
    3. Is it possible to have page numbering automated so that if I open a chapter on its own the pages will be, say, 1-20; but if I open it in the context of the book file the pages will be, say, 84-104?
    The individual files need to be checked and perhaps updated or have their numbering restarted when they're removed from the book file's control. It depends on how you've set up the numbering.
    4. Are the page numbering, TOC, and indexing tools flexible enough to where if I modify a section such that it adds or removes pages in that section, the entire book file will restructure to accommodate?
    A thousand thanks in advance to all who read this, and to any who respond!
    Both TOC and Index have check boxes to include all files in the current book. You need to update the TOC, and generate the index again with Replace Existing Index checked, after making changes.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Has anyone experienced 'Parent' & 'Child' TOC (bookmark version) issues, when using an InDesign Book to create a fixed format ePub3?

    Hello,
    I'm using the latest versions of AdobeCC and Indesign on the mac to generate fixed format ePub3 files.
    I have an Indesign Book which is comprised of 9 documents (chapters). When I create a bookmark based Table Of Contents, I'm finding that I'm having trouble getting the 'parent' and 'child' hierarchy perfect. This is because some 'child' bookmarks need to be under the 'parent' of one document within my book, and yet I need to add the bookmark from a different document (or chapter).
    In essence, I'm asking is there a way of having a 'child' bookmark in one document, nestled under a 'parent' on a different document within my InDesign book? All I seem to get are repeats of the 'parent' rather than it looking at all of the documents and synching them.
    In the screenshot below (the larger circle), I have added sharks as a parent folder in one 'document/chapter', and then later on in the book (in a different document/chapter, another shark needs to be added to the list under the sharks parent, and yet it doesn't give me the option to add it as a Child to sharks. I created another sharks parent in this later document thinking I might be able to synch across all documents, but all it seems to do is create a duplicate.
    Any help appreciated!
    Thanks, Joe

    Just thought that a much better way of phrasing what I initially asked would be: Is there is a way to synchronize bookmarks across all documents in a book?
    Thanks
    Joe

  • Sorting Documents in InDesign Books

    Is there anyway to sort documents by name in InDesign books besides dragging them to a new location. E.g. something like "Sort by Name, Ascending"? I have a bunch of documents in a book that are titled by part number and rather than having to go through all 50 documents and dragging them to a new location, I was wondering if there was an easier way to do this.
    Thanks!

    Do you have Microsoft Office installed on the Print Server?

  • How can I generate printer spreads when using an Indesign Book?

    Our design team utilizes the Indesign Book feature to tackle magazine design. This convenient feature has become part of our workflow for both print and dps versions of the content since we do not work in the same locations yet share design responsibility. We're able to see when someone else is working in a "chapter" and keep our overall content synced.
    Is there a way from the Indesign Book palette to generate a pdf that is in printer's spreads? The export options included within the Book Palette appear geared to reader spreads only. It seems the only automated option is to work from 1 large Indesign file and use the File > Print Booklet option. Is there a better solution that is geared more toward the Indesign Book user that offers the same outcome without a lot of manual work?

    I usually (when needed as sometimes is) export the entire book to a PDF using the pdf settings- bleeds etc. but I don't include inside bleeds.
    I then create a new document the original size - and use the MultiPage importer script http://indesignsecrets.com/zanelli-releases-multipageimporter-for-importing-both-pdf-and-i ndd-files.php
    You can then offset the PDF to the bleed using a negative value in the placement options (it's tricky to get the hang of this so try a few pages first)
    Then I can use File>Print Booklet and Choose PDF.
    It's a hack and a half but it can work - but I'd never send this particular file to a printers to be printed.
    As always - be careful.

  • Why does CS6 InDesign Book epub output generate and apply new graf and character style names in CSS?

    I created an InDesign book composed of documents that had had no paragraph or character styles in the palettes until text was copied over from a single overall document. I worked absolutely as clean as I could.
    I synchronized the book to that single overall document several times, including immediately before exporting the book to epub. My export settings disallowed any local formatting. Character styles were restricted to one named "Italic" for which the only format applied was Italic in the Font Style field, and one named "Small Caps" for which NO formatting was included in the character style.
    There was, as far as I can see, no reason for any character or paragraph styles to export to anything but identically-named CSS entries. That is to say, any text with the character style "Italic" applied in the InDesign doc should have output with the same text with a span class entry of "Italic" around it.
    I still ended up with p and span CSS entries with extra numbers appended to them:
    span.Italic {
    font-style:italic;
    font-weight:normal;}
    span.Small-Caps-1 {
    font-variant:normal;}
    span.Italic-1 {
    font-style:italic;
    font-weight:normal;}
    span.Small-Caps-2 {
    font-variant:normal;}
    span.Italic-2 {font-style:italic;
    font-weight:normal;}
    span.Small-Caps-3 {
    font-variant:normal;}
    span.Italic-3 {
    font-style:italic;
    font-weight:normal;}
    and
    p.x-SECTION-BREAK, p.x-SECTION-BREAK-1, p.x-SECTION-BREAK-2, p.x-SECTION-BREAK-3  and so on.
    Why would the InDesign epub output engine choose to generate and apply new spans and paragraph-level styles, which multiply the complexity of editing the CSS directly? How can I prevent InDesign from doing this?

    Perhaps I wasn't clear. When I wrote "an InDesign book composed of documents that had had no paragraph or character styles in the palettes until text was copied over from a single overall document" I meant to emphasize  the part where I CLEARLY said "UNTIL text was copied over." The text I copied over had plenty of paragraph styles. I was trying to point out that each individual document had no PREVIOUSLY EXISTING character or paragraph styles that might have added complexity to the epub output. .
    So, every paragraph in each document had a paragraph style attached, a total of maybe 20 different paragraph styles throughout the book. The only CHARACTER LEVEL styles I cared about exporting were Italic, for text that was set in italic, and Small Caps, for CAPITALIZED text that I wanted to be able to make smaller in the CSS, since I am not allowed to embed fonts and therefore have no other way of creating small caps in the xhtml files inside the epub.
    So, given that I had two character styles applied to various bits of text throughout my InDesign book ("Italic" and "Small Caps"), I would like to know why there are multiple CSS entries generated: Italic, Italic-1, Italic-2, Small Caps, Small Caps-1, Small Caps-2, and so on.
    Ditto paragraph styles. I had a paragraph style called "SECTION BREAK" in each document. Not only did paragraph style "SECTION BREAK" contain identical specs in each document--I know they did because I copied each from one single doc where they were being used identically--but I also synchronized the book repeatedly.  So why would the xhtml docs and the CSS output need p.x-SECTION-BREAK-1, p.x-SECTION-BREAK-2, and p.x-SECTION-BREAK-3?

  • Indesign book files making a PDF with spreads????

    Hi, I am working with a book file but need to make a digital PDF with spreads. So the problem is obviously that I start with a right single page and finish with a left single page in each chapter which doesn't make a spread. Is there a way around this? (apart from copy and pasting the single pages at each beginning and ending together as spreads into an empty document and replacing these pages in the PDF)
    Thanks

    Re: Indesign book files making a PDF with spreads????
    When you make the pdf of the book from the book panel.
    Create a new document call it filenamespreads or something.
    Get the PDFplacer.jsx script http://indesignsecrets.com/placing-all-the-pages-of-a-pdf-inside-indesign.php
    Run a few pages to get the position right, then do the whole book.
    Export to pdf as spreads.
    It sounds longwinded but it isn't.
    @Eugene--
    This is the closest answer to solving my problem.
    To clarify, the reason I need spreads is NOT for final printing. Its for sending a reader proof to a client to send to someone for review. They need to see it as spreads to get a "feel" for the book. I feel like it should be possible to do this, easily, without too much stress in InDesign.
    I am going to try your solution but I am a newbie about using scripts in InDesign. Never done it before. I placed the script in the scripts folder and re-launched InDesign, but how do I launch the script?
    Thanks!
    Oh, and I should have specified before, I'm using CS2.

  • Create Indesign book from paths in an excel sheet

    Hello All
    I have started to learn some scripting, and want to know if it is possible to read information from Excel sheet? In this case it is paths to Ind files.
    Today we are working with several documents which we compile into a book, this to create custom-made manuals for our customers. The script I'm looking for or will try to create will use these paths from the excel sheet to compile an Indesign book.
    Any tips where I can find information about similar tasks.
    Please respond

    Thanks for your advices.
    So if I understood it right it is impossible for Java or VB through Indesign to access information located within sheets in an Excel document. That is too bad.
    We don't have the possibility to convert the .xls to for example .csv, becouse of .csv does not support more than one sheet. An SQL database could be a possible solution, but this shouldn’t either work?
    What I don’t really understand is why you can merge information from an excel sheet into an Indesign page, but not collect strings from an excel sheet when running a script.

  • 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é

  • Export an alternate layout from a indesign book

    Hello,
    I'm working on a big file, which has been, for size reasons, separated in multiple files that have then been assembled in an indesign book
    Problem: This document is edited for print and also as an interactive pdf for ipad, which is why I have created an alternate layout for the ipad version, which contains a navigation based on hyperlinks, linking different pages and documents from the Book.
    But here is the thing, when exporting the whole book to pdf (using the Indesign Book panel), I can't choose the layout I want to export, as I can do when I export from a single document with several alternate layouts
    What I get when I export from a single file with two alternate layouts to interactive pdf
    What I get when I export the Indesign Book with two alternate layouts to an interative pdf
    Why is that? Is there a way I can export only one layout without having to RE-assemble the whole document into one file?
    If I export the whole book as it is, my two alternate layouts are just following each other and it's a big mess, not to mention the hyperlinks don't work anymore.
    Also, if the only way is to make one file, the file is then too heavy to be worked with, it's 280 pages long, with HD images on every page ( and the alternate layouts double the pages...)
    Does anyone have a solution?

    You mean, breaking the document into two or three files and then exporting each of these and then assembling the pdf files?
    But then the hyperlinks from one doc to another don't work. I tried it already.
    The problem is that I need to export ALL of these documents into ONE pdf because of the interactivity of the hyperlinks.

  • EPub export using just a range of pages from inDesign Book

    I've created an ePub Fixed Layout ebook from inDesign 2014.1. I now want to create a summary book for Apple's iBook store, using pages from multiple chapters.
    I know the ePub export dialog has an "Export Range" panel in the "General" tab. When you export from a single inDesign Document, you can either leave it as "All Pages" or chose a Page Range. However, I have an inDesign Book, with a inDesign document per chapter.
    When I do the ePub "Fixed Layout" export, I come to this panel and the option to select a Page Range is disabled, so I can't specify the pages I want. The pages are numbered to follow on from chapter to chapter.
    So, it looks to me like exporting to ePub from an inDesign Book will only allow you to create an ebook from ALL of the pages of the inDesign Book?
    I'd really like to create a summary from multiple chapters, so any suggestions would be much appreciated.
    Thanks
    Bill

    Hi Bill,
    Page range for export can only be selected when exporting a document to Fixed Layout ePub. It cannot be done when exporting book to Fixed Layout ePub.
    Regards
    -Anshul

  • Create TOC javascript for indesign book

    Hi friends,
    i am new to indesign javascript. i want to create a javascript for TOC indesign book using paragrph style
    could anyone help me. i am strugling long time.

    "It didn't work for me" doesn't work for me. Always, always, always, state why it doesn't work for you.
    Did you try to use it, but could not get it to work?
    Or, do you need to do something special that the built-in function does not do?
    It should not be extremely hard to make a javascript version that does (roughly) the same. You could try something like this:
    For every paragraph style you want to include (most likely all sorts of headings),
    Search for all occurrences, and store the text, its page number, and (important!) its story offset in an array.
    You need the text because that's what will appear in the TOC.
    You need the page number because, well, that's what the TOC is for :-)
    Most important: you need the story offset so you can reconstitute the original order of the headings. You can only search for one level of heading at a time, so without sorting, you would get "Heading 1 -- Heading 1 -- Heading 1 -- Heading 2 -- Heading 2 -- Heading 2" (etc.)
    When you have gathered all of the information for your entire book, sort on story offset. (I forgot, it's for a Book, right? You need to store a document id as well, so you can sort throughout multiple documents.) (See Ed.)
    Then write out every text in the right order, followed by its page number.
    The IndexMatic script that Marc points out should already contains lots of the logic described here -- esp. searching and storing page numbers.
    [Ed.] Thinking about it, a Book (multiple documents) should *not* cause any problems, and you don't need to know in which document some text was found. Simply sort the paragraphs on their page number; only when these are the same for more than one paragraph, sort just these on their Story Offset. Logically, there should not be two headers with the same page number in two different documents.

  • Export PDF from InDesign Book

    Hi, I have a customer that has huge problems to export PDFs from InDesign Books. He has books with many documents with a total amount of 500-700 pages, when he try to export a PDF InDesign quit unexpectedly. I wrote a script for him that export the PDF from the book without the progress bar, and sometimes it solves the problem but sometimes not, and I have a "out of memory" message. He must export multiple PDF from the same book and then merge those PDF with Acrobat but he has also interactivity sometimes and it's a nightmare to merge PDFs with interactive objects and bookmarks.  Someone of you have experienced the same problem (and maybe has a solution)?  Thank you

    It seems that InDesign saturate the available RAM during the operation of gathering information before start to export, if I restart InDesign each time and export a selection of documents it works. I'm exporting now two separate PDF and it seems to work, but again only if I close and restart InDesign before exporting, I'm working on an iMac with an Intel 2.93 GHz i7 and a total of 8 GB RAM.

  • Document modified outside of book

    I constantly have this alert icon showing up in the book panel when I clearly have NOT modified the document outside of the book.
    Is it confirmed that this is a bug if you make changes, save and then close the document without the "book" panel open? It would be crazy if one were required, before closing a document, to reveal the book panel.

    One of us is probably misunderstanding the other.
    I'm opening the document from the book panel. I'm making changes in the document. As I do so, I use other panels. The default behavior is when one panel opens, the open one collapses. So I'm not closing the book panel, but it's collapsing.
    So now I've made changes in my document that I opened via the book panel. I save the document. The book panel is collapsed. I close the document with the book panel collapsed, and I get the modified alert when I open the book panel.
    There is no way to close a document via the book panel, correct? So unless you're suggesting that it's required to show the book panel before you close a book document, there's something going wrong.
    Nowhere in the InDesign documentation, that I can find, does it state anything like "all book documents must be closed with the book panel uncollapsed."

  • I am getting error message when trying to a document in Adobe InDesign

    Hi All
    I am getting the following error message when trying to open a document in Adobe InDesign
    Document contains an invalid frame.
    Story text begins -
    Delete frame and associated story?
    Options are yes no.
    clicking no a couple of times and the document opens but then InDesign will crash with the error below
    Problem signature:
      Problem Event Name: APPCRASH
      Application Name: InDesign.exe
      Application Version: 8.0.0.370
      Application Timestamp: 4f72c3ee
      Fault Module Name: TEXT EDITOR.RPLN
      Fault Module Version: 8.0.0.370
      Fault Module Timestamp: 4f72ca9c
      Exception Code: c0000005
      Exception Offset: 0004d97e
      OS Version: 6.1.7601.2.1.0.256.48
      Locale ID: 2057
      Additional Information 1: 0a9e
      Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
      Additional Information 3: 0a9e
      Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt
    This error message can different each time and is happening on multiple documents

    thanks for the reply.
    i've installed the latest updates but still getting the error when InDesign crashes (see below)
    Thanks
    Problem signature:
      Problem Event Name: APPCRASH
      Application Name: InDesign.exe
      Application Version: 8.1.0.420
      Application Timestamp: 54aaae3e
      Fault Module Name: Public.dll
      Fault Module Version: 8.1.0.420
      Fault Module Timestamp: 54aaadca
      Exception Code: c0000005
      Exception Offset: 0019ac73
      OS Version: 6.1.7601.2.1.0.256.48
      Locale ID: 2057
      Additional Information 1: 0a9e
      Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
      Additional Information 3: 0a9e
      Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt

Maybe you are looking for

  • Invalid Security Code for my valid debit card?

    Really!!!! I guess poor people like me who spend so much money on the **** device first of all (iPhone) and the **** phone bill, have a limit to purchasing "FREE" apps from the app store because apparently, now my apple ID won't accept my debit card

  • I have been blocked from my own ITunes songs because my apple ID associated with too many devices

    I cannot access songs from my own iTunes Apple ID because it says my iPhone has been associated with too many devices.  I have to wait 90 days to access my own songs on my iPhone.  Here is what happend: 1-Our family moved.  So, with the address chang

  • Borderless Printing issues with HP Officejet 4500

    I have created a document using Microsoft word 2007 and am having trouble printing this document without borders. I have a HP Officejet 4500 which does support borderless printing. I have gone into properties when getting ready to print and made sure

  • Time Machine and backing up external hard drives

    Time machine will not back external hard drives I have connected to my Mac Pro. It works fine with the 3 hard drives mounted in the computer. Is this the way Time Machine is intended to work or am I doing something wrong? Thanks in advance for your a

  • How to create web service in netweaver 7.0?

    Dear sir. Firstly I'm new in sap product, and needs your help. I downloaded netweaver 7.0 vmware on the sap site. 1. I want to create webservice on netweaver 7.0, and call this web service from other application. 2. If I create webservice on the anot