4 Replies Latest reply on Feb 6, 2015 5:08 AM by Laubender

    [ID CC, JS] textFrame.fit() doesn’t work

    tobias.wantzen Level 1



      I’ve no idea, why the .fit() option doesn’t work. Can someone please assist!


      This is the starting point: The script duplicates an object (text frame) on a specific master page (where some object reside, which are used throughout the publication) and moves it to the actual page. There it is filled with XML data and should be fitted FRAME_TO_CONTENT:


      _toptitleFrame = duplicateIT ("label", _currPageSpread, _labelledDEFsItems, _dok);
      _toptitleFrame.move([(213-(_toptitleFrame.geometricBounds[3]-_toptitleFrame.geometricBounds[1])), 12.7]);
      function duplicateIT (_pageItemName, _moveToPage, _labelledDEFsItems, _dok) {
        _theImg = _pageItem.duplicate(_pageMaster);
          return _theImg;


      Actually the _toptitleFrame.move works perfectly, but the _toptitleFrame.fit(...) doesn’t work at all. When I command »fit content« in the UI it works perfectly.


      Any ideas?