Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Fit Frame to Content on a TextFrame

Return to Member Forum

  • Author
    Posts
    • #34099

      Hi to all scripters here,
      I’ve write a script that apply the ‘frameToContent’ FitOptions to all objects on the document based on the object style name.

      It works well but in the text frame the behavior is a little different because the script can’t fit the right side of the frame.
      If I double click manually on the right side of the bounding box (on the little anchor point in the middle right of the text frame), the text frame fit in the way I was expected, so I need to replicate the manual behavior with the script.

      Do you think that it’s possible?
      Thank you

    • #64868
      Joe Yau Pong
      Member

      I don’t understand it either. myTextFrame.fit(FitOptions.frameToContent); doesn’t work on textframe.

      So frustrated.

    • #64870
      Joe Yau Pong
      Member

      This works though:

      doc.textFrames.everyItem().fit(FitOptions.FRAME_TO_CONTENT);

      https://forums.adobe.com/thread/1059505

      Why? Anyone shed some light?

    • #64878
      Joe Yau Pong
      Member

      sorry. I made a mistake. Mclaud is right, there’s some slight problem when it is multiple lines in textframe. Please ignore my previous comments.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
Forum Ads