views:

19

answers:

1

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'm using Adobe InDesign CS5 by the way...

A: 

Found the answer by using the following code:

http://indisnip.wordpress.com/2010/08/11/round-selected-text-with-polygon/

Pieter Claerhout