CS4 creating hyperlinks in TOC from paragraph style sheet

Hi all
Does anyone know if it's possible for a script to find all instances of text in a named paragraph style  and then link each instance to the corresponding entry in a modified TOC?
The workflow is for a 800-item catalogue created in CS4. At the moment, the title for each entry is set in a dedicated paragraph style; once all entries are signed off, I generate a TOC listing all the items. All very straightforward.
My client now wants an interactive PDF so that clicking on any item in the TOC will take him automatically to the relevant page in the catalogue. I want to avoid having to generate those hyperlinks manually… I know very little about scripting but I do know this is exactly the sort of thing that should be possible:
– find first instance of text in Para Style 1
– create hyperlink named with that text
– link this to corresponding text in Para Style 2
– repeat for all instances of text in Para Style 1.
But I also know that the hyperlink/cross-reference function can be a little counter-intuitive and I don't know whether I'm asking for the moon on a stick.
Thanks!

There's an excellent script* called LiveTOC which does exactly what you're asking for. It allows you to turn all your TOC entries into hyperlinks for PDF export.
Check it out: http://www.freelancebookdesign.com/scripts/live-toc
Ariel
* which happens to have been written by me

Similar Messages

  • Calling DB from XSL style sheet is possible?Please let me know gurus

    Hi
    ANy one has done DB calls from XSL style sheet for oracle POs?
    is it possible
    kp

    Hi srini
    In PO xsl style sheet there is a field caled Manufacturer's Part no and also another filed called Buying Department.
    Some said customizing po_headers_xml and other relevant standard views..But client dont want to touch standard views.
    So my client asking me if I can use DB calls ...PLease advise me with examples
    thanks
    prasanna

  • How do I get the nested style sheets to work in the paragraph style sheets?

    How do I get the nested style sheets to work in the paragraph style sheets?

    Hi Denise, we need more information on what you are trying to do before we can help on your specific issue.
    You can look at this document, which covers nested styles: http://help.adobe.com/en_US/indesign/cs/using/WSE33E49F9-94CE-4043-AA51-4761408A63F4a.html

  • [JS IDCS5] Create tags from paragraph styles

    Hello,
    I would like to iterating through al the paragraph styles within a document to create there tags from. The tags should have the same name as the paragraph styles. Is that possible and how?
    Regards, Sjoerd

    Hi Phil,
    Absolute beginer here. The script creates tags for the styles outside groups, but for some reason it doesn't create the tags out of the Paragraph Styles in folders.
    I enabled the line below and tried to change the "myPStyle"  for "myAllPStyle" in the following lines, but still nothing. Gives error when reaches the line myDoc.changeText();
    Any hint?
    var myAllPStyle = myDoc.allParagraphStyles; //if you want this enable a line all the folder paragraph styles also consider
    for (i=2; i<myAllPStyle.length; i++){
         var myAllPStyleName = myAllPStyle[i];
         //alert(myPStyleName.name);
         try{
              var myXml = myDoc.xmlTags.add(String(myAllPStyleName.name));
              }catch(e){}
         app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
         app.findTextPreferences.appliedParagraphStyle = myAllPStyleName;
         app.changeTextPreferences.markupTag=myAllPStyle[i].name;
         myDoc.changeText();
         app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    Also, how can I make it Map the tags with the PStyles by name after with the script?
    Thanks so much
    Hector

  • From paragraph Style to "New Hyperlink Destination"

    Dear InDesign Experts
    Please help me to find a way or Script to add all headings of specific paragraph style to "New Hyperlink Destination....(Text Anchor)"
    and ... is there any automation for such a task?
    Thank you in advance

    Hi Saud,
    Try the below script.
    var activeDoc = app.activeDocument;
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = "XXXX";//Give your paragraph Style name here
    var foundRefList = activeDoc.findGrep();
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    var myCount =0;
    var foundListLength = foundRefList.length;
    for (var j = 0; j<foundListLength; j++){
        var myParas = foundRefList[j].paragraphs;
        var myParaLength = myParas.length;
        for (var i = 0; i<myParaLength; i++){
            var myText  = myParas[i].texts[0];
            app.select(myText);
            var myId = j+"_"+(i+1);
            var myHyperlinkCitDestination = activeDoc.hyperlinkTextDestinations.add(myText, {name: myId});
            myCount++;
        app.select(NothingEnum.nothing);
        alert("Process Completed\n"+myCount+" destinations added");
    p.s: I've not tested it, please check this at your end and let me know.
    ~Green4ever

  • Find start text index from paragraph style?

    hi,
        In my project,i have paragraph style name,i need to find out that paragraph start and end index positon ?
    pls,anyone help me?
    thanks,
    screen410099

    Hi Saud,
    Try the below script.
    var activeDoc = app.activeDocument;
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = "XXXX";//Give your paragraph Style name here
    var foundRefList = activeDoc.findGrep();
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    var myCount =0;
    var foundListLength = foundRefList.length;
    for (var j = 0; j<foundListLength; j++){
        var myParas = foundRefList[j].paragraphs;
        var myParaLength = myParas.length;
        for (var i = 0; i<myParaLength; i++){
            var myText  = myParas[i].texts[0];
            app.select(myText);
            var myId = j+"_"+(i+1);
            var myHyperlinkCitDestination = activeDoc.hyperlinkTextDestinations.add(myText, {name: myId});
            myCount++;
        app.select(NothingEnum.nothing);
        alert("Process Completed\n"+myCount+" destinations added");
    p.s: I've not tested it, please check this at your end and let me know.
    ~Green4ever

  • Exporting to filename from paragraph style

    I have a 80 page indesign file.  I would like to export to single page pdfs, with filenames based off a paragraph style on each page.
    Is this possible?  I have no background or experience with scripting.  Any help would be much appreciated.
    Thanks
    Derek

    The link you sent me was about Applescript. But I looked it up in the Javascript reference and this seems to work.
    You need to make three changes:
    Line 6: Change test to the name of your paragraph style.
    Line 15: Change [Smallest File Size] to the export preference you like to use, so you get resolution, bleed etc correct.
    Line 19: Change export path, I exported mine to my root, my harddrive, if you are on a pc "/c/cookbook/" + pdf_name + ".pdf" might be a better path.
    for(var p = 0; p < app.documents[0].pages.length; p++) {
         var frames = app.documents[0].pages[p].textFrames;
         var pdf_name = null;
         for(var i = 0; i < frames.length; i++) {
              if(frames[i].paragraphs[0].appliedParagraphStyle.name == 'test') {
                   pdf_name = frames[i].paragraphs[0].contents;
                   break;
         if(pdf_name != null) {
              app.pdfExportPreferences.pageRange = app.documents[0].pages[p].name;
              var export_preset = app.pdfExportPresets.item("[Smallest File Size]");
              app.documents[0].exportFile(
                   ExportFormat.pdfType,
                   File("/" + pdf_name + ".pdf"),
                   false,
                   export_preset

  • Paragraph Style Sheet Problem

    Hello. When I load style sheets from another document in Illustrator CS5.5, I've been having a problem with the color aspect of the style sheet. The formatting is okay, but the type is black, regardless of what color is specified in the style sheet. Am I missing something? I don't remember having this happen before. Thanks for your help!

    Check to see if there is a Character Style sheet applied by default. If there is, that will over-ride the color in your Paragraph style.

  • How to delte empty Style Group from paragraph style palette

    Hi Guys,
    I want to delete my empty paragraphStyleGroups folder that are Style Group 1and Style Group 3 (see pic) from my palette.
    I need a js code for this task.
    I have created script but it deletes all the Style group from my panel.
    Here is the script:
    myDoc=app.activeDocument;
    myStyleGroup=myDoc.paragraphStyleGroups;
    for(p=0;p<myStyleGroup.length;p++)
    myStyleGroup[p].remove();
    Please suggest!
    Chang

    You are awesome man.
    It is working as I need. Thanks again Kasyan.
    Regards,
    Chang

  • Do paragraph style overrides work differently in CS3 vs CS4?

    Hi All-
    I’m in the process of moving a workflow from CS3 to CS4, and have run into an unexpected problem. In the existing CS3 workflow, we receive copyedited text with Word paragraph styles applied, then import this text into our InDesign template. This template has all the same paragraph style names as the Word file, so we tell InDesign to use the InDesign style definitions in the Import options. So, for instance, the Word style for Para_Text is Times New Roman 12pt, and the InDesign style for Para_Text is Helvetica Neue 8pt, and on Import InDesign automatically changes it to Helvetica Neue 8pt. This is as we want it.
    Things fall apart, however, when we import the same text into the same template in InDesign CS4. It still applies the InDesign style definition, but has additional overrides to make it look like the Word style definition. So, it recognizes that the underlying paragraph style should be Helvetica Neue 8pt, but it then preserves Times New Roman 12pt as an override. If I select the text and do Clear Overrides, it’ll revert to the Helvetica Neue 8pt we want it in, but for other reasons that solution is less than ideal.
    I think I can come up with a rather kludgy way around this, but I’m trying to understand exactly why we’re getting the different behavior in CS4. It seems like paragraph style conflicts are being handled in a different way in CS3 than CS4 – in CS3, if the InDesign paragraph style specifically spelled out a font, that would dominate on import; now, in CS4, it’s allowing the Word paragraph style to seep through as an override. Any thoughts as to why this is happening?
    Thanks,
    -Nate

    Hi Chris.
    Good news. I cant tell you how happy i am for all your help ;-) and you other guys.
    The latest Eizo 5.2.1 software fixed the problem on all 3 Eizo monitors.. Weeee
    I'm back to normal.
    Now i just have another damn problem started not long ago ;(
    My Photoshop CS3 and CS4 keeps crashing on me after a wile of work ???
    I tried everything. Deleted preffs etc. etc.
    It have been working for long long time but suddenly it keeps crashing all the time.
    I tried to remove some new plug-ins, but it was not that.
    Only thing i did also was to install new ram.
    Upgraded from 10GB to 14GB in all our Mac Pro.
    So after i tried to switch the ram around to check if some was bad.
    Also run some memory software but everything came out right.
    So now the only thing left is that Photoshop dosent like ram between 14GB & 16GB.
    Under was fine and i never tried over 16 gigs.. weird
    Any ide what could corse this ?

  • Trouble with CS5 InDesign Paragraph Styles

    I am creating a new template. I want one style to be "TOC Title", and another to be "TOC Level 1". All my concerns center around the Paragraph Style Options window (Type > Paragraph Styles > Create New Style >(double-click style to modify)  )
    1. No matter what I do, if I stipulate that "TOC Level 1" has leading (Tabs option, enter a "." or period in the Leader box), then InDesign does this for ALL my paragraph styles.
    For the record, under the General option, my "Based On" box is set to "[No Paragraph Style]" for both paragraph styles.
    So either I have to live with the TOC title having leading on it, or the TOC Level 1 having none, and in either case having to do something manually to the TOC everytime I use the template.
    How can I fix this so that TOC Title has no Leader and TOC Level 1 has a Leader of "." ?
    2. How can I set my TOC Title paragraph style so that it centers on the page?
    Edit: Two days later and no reply - I would have gladly supplied more information if I did not make the issue clear enough, and I would have even appreciated a simple "Sorry, I don't know." Since it is highly improbable that nobody out there knows ANYTHING about Paragraph Style tabs in Adobe CS5 InDesign, I must conclude that my issue is simply not "in" enough to be considered worthy of attention from the unnamed scores of elitists which must run this forum.

    I think the only way I'm going to be able to understand the problem is to see a sample file. Please make a sample, even if it has nothing more than your style definitions that are failing, and post a link to it here.

  • [Basic Paragraph] style behaviour upon copy/paste

    Hi,
    we just get started changing from Quark to InDesign, and our lead layout-producer is not so crazy about style sheets, so everything she creates is using the [Basic Paragraph] Style.
    A by her created libary now contains groups of text objects in Basic Paragraph with format changes +
    When I use these groups, or copy and paste from another document, why does InDesign keep the changes like fontsize or -color, but does change the font?
    My basic paragraph does use another font, so its quite annoying INDD keep the changes, but keep change the font.
    What can I do to prevent INDD from changing the font?

    So, i made this beauuutiful thingy for a test. It looks disgusting, i know. The point is that it uses 4 fonts and different modifications.
    If I get you right, to prepare a "good" document, our layout-producer should clogg our documents with different paragraph-styles not to use the Basic? Sure, she can convert it into paths, but different collegues have to translate this stuff later so that isnt an option.
    Maybe she can "design" things like that in Illu, giving us an AI to use.
    I made an irritating discovery:
    As I built this thing with Futura as my Basicparagraph-font, i dragged it into a libary, closed every doc to change my default-paragraph-style to another font to see what happens. I set up a empty doc and dragged it back in again – no changes at all. I was surprised. Its in the basic, it has a +, and if i click on basic it changes to GillSans, if i alt+click the modifications (like the colors) turn to black… – this is what i was looking for :-)
    But why with my other test-object. Im nearly in closing time here, so i will upload an image tomorrow, but the only variable that haved changed to my second try minutes ago:
    – the objects were converted using Q2ID (Markzware)
    – the group just contained one (but another) font
    Maybe theres the problem somewhere.

  • Framemaker 8 problem with paragraph styles

    Hi,
    I manage a documentation (one file) including paragraph styles organized like that :
    -- Chapter
         |--- Sub chapter
           |--- Sub Sub chapter
    My question is simple
    When a create a PDF file from my document, including bookmarks, I'm encountering the following problem :
    The "chapter 4", "sub chapter 4" and "sub sub chapter 4" paragraphs are created correctly. The bookmarks are created with the correct place.
    Like that :
    |---- chapter 4
      |---- sub chapter 4
       |----- sub sub chapter 4
    BUT
    The "sub sub chapter "5 paragraph styles are created into the "Chapter 4" structure, added with the "sub sub chapter" of Chapter 4. And the Chapter 5 just contains the "chapter 5" and "sub chapter 5" bookmarks.
    Like that :
    Chapter 4
        |---- sub chapter 4
           |---- sub sub chapter 4
           |---- sub sub chapter 5
    Chapter 5
       |--- sub chapter 5
    After checking the structure of my document, I do not find any thing which could create this problem.
    The paragraph styles seems to be correct.
    Thank you so so much to help me because I don't know how to replace the "sub sub chapter 5" below the" sub chapter 5".
    Phil ;o)

    There are a few ways to go with this. One is to put all the files in a Book,
    temporarily, and set the one with the correct style definition as the
    source, then synchronize the paragraph styles. This will change ALL styles
    with the same names throughout all the documents, and add any styles that
    are present in the source, but not in one of the other files, so it is a bit
    risky, especially if any styles are based on or [Basic
    Paragraph] itself is used in one of the files and it isn't already defined
    exactly the same in all files.
    You can also open any file and go to the Paragraph Styles panel menu and
    choose Load Styles, then select the style you want to load, and how to
    handle a conflict (Use Incoming), which will give you more control over what
    happens.
    Or each time you open a file and get the missing font warning you can go to
    Find Font and select the missing font, then pcik your substitute, check the
    redefine styles box, and click Change All. This would probably be the best
    choice since it doesn't depend on style names to make the correct changes.

  • Lost paragraph styles

    Help!
    I don't know what I have done, but I had several indesign files that were placed into "book" format. They all had paragraph style sheets that I had set up. It was lovely.
    Today, I opened a new indesign file and did a "save as" and attempted to drag the style sheets from my existing book files to my new file. Now, when I open all of my old "book files", many of the paragraph styles that I had originally set up are GONE!! Now there are styles that look to be from the new file I opened and "saved as" from. Even files that I didn't even touch have lost some of the paragraph styles I set up. The document has not lost any formatting, but I can't find the style names in the paragraph style window. What in the world??
    Thanks so much for any help!!
    TH

    Hey mac.jedi
    Did you ever find a fix for this issue as I'm having the same problem:
    This was on a document set up with lots of styles, however I have tried this on a new blank document and had the same results.
    I also noticed when you select text, the text panel displays Myriad Pro even when it's not.
    Frustrating...

  • How to find paragraphs by using paragraph style name?

        How to get the Paragraph style UIDRef from paragraph style name.
    To find the paragraphs using Paragraph style i want UIDRef of paragraph style.Can some one help me..,

    IDocument *doc = GetExecutionContextSession()->GetActiveContext()->GetContextDocument();
    UIDRef ws = doc->GetDocWorkSpace();
    InterfacePtr<IStyleGroupManager> paraStyleNameTable(ws, IID_IPARASTYLEGROUPMANAGER);
    PMString styleName("someStyle");
    UID paraStyleUID = paraStyleNameTable->FindByName(styleName);
    if(paraStyleUID != kInvalidUID)
         //We found the style
         UIDRef styleRef(doc->GetDataBase(), paraStyleUID);

Maybe you are looking for