2 Replies Latest reply on Oct 6, 2010 2:11 AM by Marijan Tompa [tomaxxi]

    Getting the geometric bounds of a piece of text

    PClaerhout

      I have an InDesign document which has hyperlinks contained inside a text frame.

       

      I need a way to determine the geometric bounds of the text contained in the hyperlink. Unfortunately, I can't seem to find a way to do this in ExtendScript.

       

      // Export the hyperlinks in the document
      for (k = 0; k < myDocument.hyperlinks.length; k++) {

         
      // Get the hyperlink
         
      var myHyperlink = myDocument.hyperlinks[k];

         
      // Check that the source is a text item
         
      if (myHyperlink.source instanceof HyperlinkTextSource) {

             
      // Here, I need to get the geometric bounds of the text contained in the link

         
      }

      }

       

      Any ideas on how this can be done? I've found how to get the geometric bounds of the text frame, but I need them for the link specifically...

       

      I'm using Adobe InDesign CS5 by the way...