3 Replies Latest reply on Mar 4, 2011 3:29 AM by Loic.Aigon

    Please Help!


      Dear Community!


      First of all, greetings to everyone.


      Here is the story. I am working with InDesign since several years, but never really needed any automation. Now I will have the task to convert .doc documents into ePub. I have read tutorials, forums, and so far I think to be able to do it. The problem is these documents I will have to convert are at least 200 pages, but often over 500 pages, and there are a lot of them. (nearly 1000) The documents come from the publisher as manuscripts, and are not professionally edited.

      As you may know, for an epub, I have to remove the font family italic and substitute it with the character style italic to preserve appearance. This works very well with find and change (also for bold ect.) My problem is I don't want to start these queries manually from a saved file, but use findchangebylist.js.


      1.: For that, I've looked up and found the line:

      grep     {findWhat:".",fontStyle:"Italic"}     {changeTo:"$0",appliedCharacterStyle:"Italic"}     {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}


      the code seems ok to me, but I am a noob at scripting and do not understand Why is it not working?


      2.: I will also have to apply paragraph styles for Titles and chapters ect. which I also would like to automate. There I figured out to have 2 ways form logical point of view.

           a: I look for any paragraph that is written with bigger font size than 14, and change that. Is that possible? Can I do such a query? If yes, can you give me a hint for the syntax?


           b: If that is not possible, I still could do that 30 times for font size 14, then for 15, then for 16... and so on.


      I would like to change these into red character color, and then go through and change them manually to heading 1, and heading 2 and so on. Or is there a better way to do that?


      I would appreciate any help you can give me.


      Thanks in advance.



        • 1. Re: Please Help!
          Loic.Aigon Adobe Community Professional

          I would guess your first error is due to the grep pattern. Catching groups are indexed from 1 to 9. So $0 may probably be null.

          Maybe use $1 instead.



          1 person found this helpful
          • 2. Re: Please Help!
            NDSnyder Level 1

            Thanks Loic!


            That solved the first problem .

            • 3. Re: Please Help!
              Loic.Aigon Adobe Community Professional

              Regarding to your 14+ size request, you can't set that condition with FC Grep Dialog (unless I am wrong).

              So you have to keep size considerations aside and loop through the results (findGrep()) and check if the result match the condition (font size > 14).


              Be aware that a result can have several different point sizes so you may need to loop through the textRanges inside the result itself.


              My humble opinion is that you may need to hire a scripter for that because even if it's not that complicated, there are a lot of nuances that may require experience.



              1 person found this helpful