1 Reply Latest reply on Aug 1, 2015 1:22 AM by mani@pixel

    In all pages ,how to set the paragraph lines end at the same line of the bottom like book format..

    mani@pixel

      hi,

      i'm trying to balance the each page paragraph lines end at the same line at the bottom of the each page..

      so i removed the unwanted space, line breaks in the document..

      eventhough its not ending at the same line at the bottom of the page..

        • 1. Re: In all pages ,how to set the paragraph lines end at the same line of the bottom like book format..
          mani@pixel Level 1

          this is my code ....

          //#target indesign

          //app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;

          clean_up (app.activeDocument, true);

          var doc = app.activeDocument;

          var height = doc.documentPreferences.pageHeight; 

          // alert(height);

          var custheight = 67;

           

             if(height != custheight)

             {

              doc.documentPreferences.pageHeight = custheight;

             }

           

           

          //app.activeDocument.save();

          alert ("Clean_up Completed !")

          //exit();

           

           

          function clean_up (scope, caps)

          {

          hyphenOff();

           

          app.findGrepPreferences = app.changeGrepPreferences = null;

          app.findChangeGrepOptions.includeFootnotes = true;

          app.findChangeGrepOptions.includeHiddenLayers = true;

          app.findChangeGrepOptions.includeLockedLayersForFind = true;  

          app.findChangeGrepOptions.includeLockedStoriesForFind = true;

          app.findChangeGrepOptions.includeMasterPages = true;

           

          // series of tabs

          //change_grep (scope, '\\t\\t+', '\\t');

          // series of returns

          change_grep (scope, '~b~b+', '~b');

          // series of spaces

          //change_grep (scope, '\\x{20}\\x{20}+', '\\x{20}');

          // trailing spaces and tabs

          change_grep (scope, '\\s+$', "");

          // leading spaces/tabs

          change_grep (scope, '^\\s+', "");

          change_grep (scope, '~e+', '.~S.~S.');

          change_grep (scope, ' . . .', ' .~S.~S.~S.');

           

          }

          function change_grep (obj, f, r)

          {

          app.findGrepPreferences.findWhat = f;

          app.changeGrepPreferences.changeTo = r;

          obj.changeGrep()

          }

            

          function hyphenOff()

          var doc = app.activeDocument.stories.everyItem(); 

          doc.texts.everyItem().hyphenation = false; 

            alert("Done: Hyphenation is off for all stories"); 

          };