[CS5 Server/JSX] Generate the table of contents at the beginning of the document

Hello

The following script generates a table of contents:


  myTOCStyle = myDocument.tocStyles.itemByName("TOC");
  myMasterSpread = myDocument.masterSpreads.item("A-Master");
  myTocPage = myDocument.pages.add(LocationOptions.AT_BEGINNING, myMasterSpread);
  myIndexFrame = myDocument.textFrames.lastItem();
  myBounds = myIndexFrame.geometricBounds;
  myX1 = myBounds[1];
  myY1 = myBounds[0];
  myDocument.createTOC(myTOCStyle, true, undefined, [myX1, myY1]);

When I run this Script on the InDesign CS5 server, it generates a table of contents, but it is not placed on the page just added at the beginning. It is placed on the first page containing the content where the table of contents is generated from. Also the added page at the beginning does not contain the elements of the master page, it's just a page of blanco.

When I run this Script on InDesign CS5 to office, the table of contents are placed on the first page added with this script. Also, does this page contain master page items!

How is it possible to place the table of contents (with overflow text) before the first page containing the content. The page that contains the table of contents should contain elements of the master page.

Sjoerd

myTextFrame = myStory[0].textContainers[0];

He lacked the monarticle after [0]

Tags: InDesign

Similar Questions

  • CS5 server crashing on the document close

    Hello guys,.

    I have another little problem with our indesign plugin. With CS4 server the plugin worked well, but on the CS5 server it crashes the server when closing documents with javascript. I think that this could be a problem with the new architecture of multithreading in CS5, but what exactly I need to change to fix this? Which is perhaps a pointer to the document inside my plugin which is not released?

    Thanks in advance!

    It's true, the QueryInterface method increments the counter by references on the Interface, but because you do not release the interface, its refcounter never gets decremented. Use the InterfacePtr template class
    --
    Piotr Maciej Przepiora

    http://Phoibos.pl

  • How can I generate a table of contents of bookmarks

    How can I generate a Table of contents of bookmarks in Adobe Acrobat XI?

    Something to try.

    Rick Bostein provided an Action of Acrobat "report bookmark".
    With this report in PDF format you can insert at the beginning of your PDF document to serve as a "TOC".

    Go here:

    https://acrobatusers.com/actions-Exchange

    Scroll a few.

    Be well...

  • I have added a hyperlink which is a file video .mp4 but it does not work when I generate the document.

    I have added a hyperlink which is a file video .mp4 but it does not work when I generate the document.

    Hello

    Do you use the WebHelp for the CHM converter script? If so, this screenshot may seem reasonable. If this is not the case, this isn't out CHM.

  • How to keep the format setting when generating a table of contents

    Hello

    I have a superscript® in a title in a document that should be put in the Table of contents. When I generate the table of contents, I can't keep the format in the table of contents.

    I could cheat and manually change the, but there must be a way that remains with these properties whenever I have to regenerate the table of contents.

    No idea how?

    Kind regards.

    What version of FM?

    What the police?

    There are two separate issues here:

    1. If you are super as a character Format in the files of body, the format must be in character for the OCD catalogue, or the formatting is not applied.
    2. If you do this and get it display correctly in the table of contents, which will break the hyperlink linking it.

    The solution is usually to do great as characters of Unicode natively by exposing and not the character Formats.

    See: TOC link with a character index does not in PDF format

  • How to insert page codes and generate a table of contents?

    Help!

    I have a Multi-document of 150 pages. I need to know How TO:

    (1) Insert the code of the page, and

    (2) to create a Table of contents which generates the section headers and page numbers.

    My computer is a PC and I am running Acrobat Reader Professional 11. When I open the PDF file that has been created/saved in Acrobat version 7 x, the following message appeared: "Acrobat has detected that this page has no editable text or that he has analyzed the content. These documents are better led by conversion to another format by using the export file option in the editing of content panel. " I exported the PFD to a Word according to the document, but there are many errors in code and text that would be too labour intensive.

    Does anyone know a work-around for my dilemma? Thank you very much for the help!  :-)

    Barbara Hutchison wrote:

    I am running Acrobat Reader Professional 11.

    There is no such thing; It's either

    1. Adobe/Acrobat Reader
    2. Acrobat Pro
    3. Acrobat Standard

    You will need Acrobat, not reader, for what you are trying to reach.  If you do not have Acrobat, what is your version?

  • tabStops in Acrobat Pro XI to generate a Table of contents, text do not fill

    Hi all

    I've searched the forums for an answer, but could not find. I'm defining the ownership of para.tabStops via JavaScript (or try), but do not see the fruits of my labor. The form field, after running the script:

    1. is not filling with any text
    2. has no tab stops within the field (checked with the properties of the form field text box)

    Here is my code snippet:

      //http://blogs.adobe.com/dmcmahon/2012/10/16/acrobat-xi-new-tab-stop-feature-available-for-rich-text-fields/
      //http://blogs.adobe.com/formfeed/2009/06/managing_tab_stops_in_fields.html
      //section, subsection, pages, date, revision
      //defines tab stops for text box, use "\t" to insert a tab
      this.getField("1-1ListOfEffectivePages_M").para.tabStops = "left 0in left 0.25in left 3in left 4.5in left 6in"; 
      var TOCLines = new Array();
    
      TOCLines[0] = new Object();
      TOCLines[0].text = "Table of Contents" + "\t\t" +  "I" + "\n";
      TOCLines[0].weight = 900; //bold
      TOCLines[0].textSize = 12;
      TOCLines[0].textColor = color.black;
    
      TOCLines[1] = new Object();
      TOCLines[1].text = "\t" + "List of Effective Pages" + "\t" + "1-1" + "\t" + Date + "\t" + "N/A" + "\n";
      TOCLines[1].textSize = 11;
      TOCLines[1].textColor = color.black;
    
      //...
    
      TOCLines[23] = new Object();
      TOCLines[23].text = "Miscellaneous Information" + "\t\t" + "XI" + "\n";
      TOCLines[23].textSize = 12;
      TOCLines[23].weight= 900;
      TOCLines[23].textColor = color.black
    
      //commit to TOCBox
      this.getField("1-1ListOfEffectivePages_M").richValue = TOCLines;
    

    Obviously, the field I want to be filled is "1-1ListOfEffectivePages_M" and it is in the PDF file.

    From what I can tell, there is not a problem with the code (that's what they all say, right?). Online documentation however seems to lack.

    I suspect that it is maybe because my PDF form is not dynamic, but I don't know how to check that.

    There are dynamic XFA forms and static XFA forms, and AcroForms. If you have an XFA form then you will only be able to change using LCD. AcroForms can only be edited in Acrobat.

    If you converted your entire form to XFA then your code should work in Acrobat/Reader, Yes, but this isn't a trivial task, and you will need to purchase LCD because it no longer ships with Acrobat, as it used to be.

  • Error when generating the Document...  Breakdown report

    Hey all,.
    I get errors in a production environment by trying to break-up of the invoice data.
    This process was robust enough and off 1000 + bills per day, I can only find 4 which fail regularly.
    Why am I quoting?, just to show that I think it is a matter of data, but just can't see something that stands out.
    I can take the output xml and run through my suite of development on my machine local and everything works well.
    Just when she will roll through the db, it's when it fails.
    Here is the result of burst which shows error...

    <? XML version = "1.0" encoding = "UTF-8"? >
    < BURS_REPORT >
    < REQUESTID > 27044820 < / REQUESTID >
    < PARENT_REQUESTID > 27044726 < / PARENT_REQUESTID >
    < REPORT_DESC > invoice print selected bills < / REPORT_DESC >
    < fichier_de_sortie > [$OUT_DIR] / o27044820.zip < / OUTPUT_FILE >
    < document_status >
    KEY to <>< / KEY >
    PDF of < TYPE_SORTIE > < / TYPE_SORTIE >
    < DELIVERY > < / DELIVERY >
    < OUTPUT > < / OUTPUT >
    < STATUS > failed < / STATUS >
    Error in JOURNAL of <>while the generation of the Document... < / LOG >
    < / document_status >
    < / BURS_REPORT >

    The problem is that this release does not necessarily help, I can't find clues in the newspapers of the OPP.
    So... the question becomes...
    Any ideas on where I can look at to solve this problem? +
    Or where I can find clues to, which would have the possible points in the question? +

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    BI Publisher 5.6.3

    Thank you
    Hayden,

    Using reports6i as the XML generation tool? If so good luck with that, Oracle will not change for you. Trust me. reports of 2017 oracle is desupported.

    You can paste this as your setting in your xml file? In addition, reports6i can not handle xml included in the field.

    There are two options for escape character:

    1. you will need to wear on a data model. I have a few conversion utilities that make it fairly painless.
    2. try a calculated formula.

    http://bipublisher.blogspot.com/2009/05/bi-Publisher-reports6i-to-BIP.html

    IKE Wiggins
    http://bipublisher.blogspot.com/

  • [CS5 Server/JSX] allGraphics geometricBounds parents does not not on InDesign Server

    Hello

    The following script works fine on InDesign CS5 Desktop:

    g = app.activeDocument.allGraphics;
         
    for (i=0; i<g.length; i++)
    {
    g[i].parent.geometricBounds = [0,0,"150mm","150mm"];
    g[i].fit(FitOptions.PROPORTIONALLY);
    g[i].parent.fit (FitOptions.FRAME_TO_CONTENT);       
    }
    

    When I run the script for InDesign Sever I get the following error:

    Error Number 30614
    Invalid object for this request,
    
    g[i].parent.geometricBounds = [0,0,"150mm","150mm"];
    

    Why .parent does not work on the server?

    g = myDocument.allGraphics;
    
    for (i=0; i
    

    The solution!

    Recompose() to insert automatically the pages

  • Flash CS5 - relative path of the document class and the location of the package

    It seems that I have no trouble to my class a FLA document class project when the FLA is the same root in the root directory of the package. However, if the FLA is nested within a subdirectory, then paths relative to a nested class in the package will not work.

    location of package & sample class: com.company.project.ClassName

    CASES1:

    Package location: \MyProject

    The FLA location: \MyProject

    where is the path of document class: ""./com/company/project " "

    Case 2 (does not work):

    Package location: \MyProject

    Location of the FLA: \MyProject\MySubFolder

    where is the path of document class: "... / com/company/project"

    If someone can provide an explanation as to why nested FLAs cannot point to custom packages to parent directories level OR show how this can be done, it would be much appreciated.

    Now that I think about, the two paths are relative, which makes it more confusing.

    Thank you.

    It works for me: http://www.kglad.com/Files/forums/tt.zip

  • Generate the table of contents with chapter markers?

    It has been a while since I had to install and create a table of contents for a long document of single file, but I'm sure that I created TOCs in this way in the past. Then, why the text in the Section markers will appear in the table of contents? It is even possible to generate a table of contents that contains text of article marker?

    I use InDesign CS5 in Windows. I have a file single document I'm trying to generate a table of contents for. I designed a 16-page manual in an inDesign file that includes a cover page, table of contents page and seven "chapters."

    I created a separate section for each 'chapter' and used Chapter markers in the top of the page master for chapter names. It's something I did in the past of syntactically long documents containing several chapters.

    I put the first page of each 'chapter' as a new Section on the Pages panel. In numbering and Section Options for each page, I checked the Section getting started, Automatic Page numbering, the Style of Page numbering: 1,2,3,4... and in Section marker: I put the name of 'chapter' in the text box.

    InDesign_Pages_NumberingSectionOptions.jpg

    I've set up paragraph and character Styles and has used throughout my document. When I put in place the table of contents I created everything correctly, including a heading style that I used for all the sub lines in my file and my style of Section marker for chapter names.

    InDesign_TOC.jpg

    When I insert the table of contents, generate headers sub with their page numbers, but the titles of the chapters which are chapter markers do not generate. Am I missing something or is it still possible to enter the text of chapter markers in a table of contents? I'm sure that he's worked in the past. Can anyone offer a solution for this?

    Thank you

    Kat

    Looks like the markers section present only in the table of contents if they are on a document page. Try manually to the substitution of the frame.

  • All my attempts so far to generate the table of contents for Kindle (.mobi) failed. Can anyone help?

    I used InDesign CC to create an epub file and the TOC and the Navigation bar appear perfectly in Adobe Digital Editions (version 3.0). Then I saved the file to the IDML format open InDesign CS6 and use the Kindle Plugin to create a mobi file. I use the same style of table materials used to create the epub file, but although Kindlegen validates the file, the table of contents is unable to generate. I've been on several discussion forums and many people express problems by having their TOC displayed in Kindle Previewer. Can anyone help?

    Hello

    Kindle requires a separate html file for OCD and even must be referenced in the guide in content.opf element. In your InDesign CC document, generate the table of contents on a page and make sure the option 'Make the anchor text to the source paragraph' is checked.

    Now export the EPUB 3 file. Open EPUB in Sigil (it's a free EPUB editor of Google). Menu Goto tools-> Table of contents-> generate HTML Table of contents. This creates a new xhtml file and automatically adds the element of guidance in content.opf like this:

    Save EPUB and open directly into Kindle Previewer. Table of contents option must be turned on now and should work.

    Please try and let me know if it works.

    Kind regards

    POOJA

    InDesign engineering

  • Creating hyperlink in the generated table of contents

    Hello

    I use InDesign CS4 and the difficulty to create hyperlinks in my automatically generated by Table of contents. I can create the destination in the document, but then the opportunity to create the new hyperlink (from Interactive menu drop-down) in the table of contents has disappeared. Option is not visible anywhere elsewhere in the document, or if I create manually the table of contents, just doesn't seem to work with generated automatically a.  Does anyone know if this is a known problem in CS4?

    Have you tried checking the "Hyperlink" box on the PDF export?

  • Sensitive HTML5 seems to be the construction of a table of contents with a "bc-#" at the end of the favorite locations leading to failure. Can this be avoided?

    RoboHelp11 generates a table of contents where the places of the xxxx.htm #aaa of the form have a bc '-' and a final number added.  In the same place that a link in the text does not.

    No doubt there are some settings that causes this.  How can I disable this addition?

    What is the fault you are experiencing?

    The #bc-# are added when a subject is used repeatedly in the table of contents. HR uses this fact to know what breadcrumbs that they must. To avoid this, use excerpts rather than add the topic to the table of contents, several times.

    Kind regards

    Willam

  • I can't get the page numbers in my table of contents to update when I update the book.


    I use Framemaker 11 and I have two tables of contents in my book: one in English and French. Each table of contents to links to various documents in the same book. The reference page for each table of contents is defined and properly displays the positions 1 and 2, I said that it appears, but numbers not updated when the contents of my document files change to another page. I checked the settings of conditional text in my document files; they are correct. When I update the book, I choose to update the numbers, all the cross-references, all text inserts, OLE links, generate a Table of contents, lists, and indexes. What I am doing wrong? Thank you.

    If they are not knocked down, then they are certainly not generated files. See the example in the help of FM11: http://help.adobe.com/en_US/FrameMaker/11.0/Using/images/bk_hier_books.png

    The 'K' is a TOC file that FM recognizes a generated file.

    Because you have created your table of the contents of the French with the help of another structure of the book, you could import reference this TOC file in another file of FM (for example to create an inset text) in the main book you want. However, you need to make updates in two steps. First update the French book to revise the table of contents. Then update the main book to get the rest of the correct pages (and given that the table of french contents are imported by reference, FM always uses the most recent version).

Maybe you are looking for

  • Designer of Microsoft keyboard and mouse

    Thus, all new Mac mini running El Capitan 10.11.2, I am trying to connect via bluetooth, mouse and keyboard from the designer of Microsoft... https://www.Microsoft.com/accessories/en-us/products/keyboards/designer-BLUETOOT h-Office/7n9-00001 The mous

  • 9214 OR problem with a common mode error

    Hey,. I take readings using thermocouples type k using the NI 9214 module in a cRio.  System works very well at room temperature, but once I take the surroundings up to 300 ° C thermocouple, I get the error message: "a common mode error has been dete

  • tablet installation problems

    my computer does not recognize my Galaxy tab 2 7.0 as a media device, it recognizes the camera but the device does not appear in my computer, so I can't do anything to transfer my 'tab' or SD card

  • SX20 power brick Dimensions

    I have a few I need to install a codec SX20 alongside the ring, and I need to know the dimensions of the power of SX20 "bricks", as well as the way in which the wiring between the "bricks" and the codec is.  Can someone help with this?  I could not f

  • I want to activate my mobile fairycut

    I want to activate fairycut on my laptop, I used on my laptop, but to edit using my laptop