Skip to main content
Inspiring
September 18, 2020
Answered

Hyperlinks Panel

  • September 18, 2020
  • 1 reply
  • 303 views

How to get Source or its length using indesign sdk functions when hyperlink panel shows in the form of number(0.7006 like that).

In the below screenshot "13" is my source from text, but in hyperlinkpanel it shows .9007 And while reading using sdk function I got .9007 But I want "13" or its length 2.Is it Hidden? if yes then how to get source?

How to get that?

This topic has been closed for replies.
Correct answer Laubender

Hi Madhuri,

what you see in the Hyperlinks panel is the name of the hyperlink.

 

What you need is in the source property of that hyperlink object.

Depending what kind of source it is, CrossReferenceSource or HyperlinkTextSource, you must go to property sourceText of that source property ( available for both flavors of source I mentioned ) and look for sourceText.contents.

 

In pseudo code:

document.hyperlink.source.sourceText.contents

 

All my descriptions are in ExtendScript terms.

Hope, you find you way analog to it in the SDK.

 

Regards,
Uwe Laubender

( ACP )

1 reply

LaubenderCommunity ExpertCorrect answer
Community Expert
September 21, 2020

Hi Madhuri,

what you see in the Hyperlinks panel is the name of the hyperlink.

 

What you need is in the source property of that hyperlink object.

Depending what kind of source it is, CrossReferenceSource or HyperlinkTextSource, you must go to property sourceText of that source property ( available for both flavors of source I mentioned ) and look for sourceText.contents.

 

In pseudo code:

document.hyperlink.source.sourceText.contents

 

All my descriptions are in ExtendScript terms.

Hope, you find you way analog to it in the SDK.

 

Regards,
Uwe Laubender

( ACP )