2010-10-05 20 views
1

我有一個InDesign文檔,其中包含文本框架中包含的超鏈接。獲取一段文本的幾何邊界

我需要一種方法來確定超鏈接中包含的文本的幾何邊界。不幸的是,我似乎無法找到在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 

    } 

} 

有關如何做到這一點的任何想法?

我使用Adobe公司的InDesign CS5的方式...

回答