2 Replies Latest reply on Sep 20, 2016 12:29 AM by Daniel Sterchi

    Make sure text frames do not exceed margin

    jakec88782761 Level 2

      I need a script which detects text frames which exceed a 10mm page margin.

      I'd like these frames to automatically be set to the edge of the margin at 10mm.



      var frames = app.activeDocument.textFrames.everyItem().getElements();

      var marg = app.activeDocument.pages.everyItem().marginPreferences;
      for (i=0;i<frames.length;i++){
      if (frames[i].geometricBounds>marg){




      Am I on the right track with this script?