1 Reply Latest reply on Feb 9, 2013 3:45 AM by -hans-

    overflowing texframe in indesign cs6

    mrfsrf5

      Hi all,

      having a small problem with the script that creates texframe and places all the link name in that textframe

      var myDocument = app.activeDocument; var myText = myDocument.textFrames.add(); var links = myDocument.links;   for( var i=0; i<=links.length-1; i++ ){             myText.contents = links[i].name +"\r"; }   app.activeDocument.stories.everyItem().textFrames.everyItem().fit(FitOptions.FRAME_TO_CONTENT);

      also tried this

      myText.fit(FitOptions.FRAME_TO_CONTENT);

        • 1. Re: overflowing texframe in indesign cs6
          -hans- Level 4

          Hi,

           

          at least you've got to specify the width of the textframe, so that it can be handled:

           

          for example:

           

          var myDocument = app.activeDocument; 
          var myTextframe = myDocument.textFrames.add({geometricBounds:[0,0,100,100]}); 
          var linkNames = (myDocument.links.everyItem().name).join(', ');   
          myTextframe.contents = linkNames;
          myTextframe.fit(FitOptions.FRAME_TO_CONTENT)
          

          Hans-Gerd Claßen