1 Reply Latest reply on Nov 25, 2016 3:50 AM by hemantk68440527

    hyphenation of all paragraphs


      I am trying to set language to a textframe with numerous paragraphs and apply hyphenation and some formatting, but something goes wrong and the script doesn't work.

      here is the code



      app.activeDocument.textFrames[0].ParagraphAttributes.language = languageType.ENGLISH;

      app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.hyphenation = true;

      app.activeDocument.textFrames[0].paragraphs[0].paragraphAttributes.everyLineComposer = true;

      app.activeDocument.textFrames[0].paragraphs[0].ParagraphAttributes.spaceAfter = 0;


      Why? How get it working?

        • 1. Re: hyphenation of all paragraphs

          Paragraph class is no associated with TextFrame class.


          you can try this way:

          put one text frame in document.


          var activedoc = app.activeDocument;

          var group_items = activedoc.pathItems;

          var text_item = activedoc.textFrames;

          var pathRef = activedoc.pathItems.rectangle(text_item[0].textPath.top, text_item[0].textPath.left, text_item[0].width, text_item[0].height);

          var textRef = activedoc.textFrames.areaText(pathRef);

          var paraAttr_0 = textRef.paragraphs[0].paragraphAttributes;