Highlighted

Text Hyperlink

New Here ,
Mar 31, 2020

Copy link to clipboard

Copied

Hello All,

I am trying to extract Hyperlink applied to text in a frame. I am able to get the destination url but not able to get the text area / index where the hyperlink starts.

Has anyone tried this. If so please let me know how.

 

Thanks & Regards

Farzana.

Adobe Community Professional
Correct answer by brianp311 | Adobe Community Professional

You can get the sourceText's insertionPoint, and the index of that IP within its containing object, with: 

 

 

 

hypes[i].sourceText.insertionPoints[0];
hypes[i].sourceText.insertionPoints[0].index;

 

 

 

Topics

Scripting, SDK

Views

329

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Text Hyperlink

New Here ,
Mar 31, 2020

Copy link to clipboard

Copied

Hello All,

I am trying to extract Hyperlink applied to text in a frame. I am able to get the destination url but not able to get the text area / index where the hyperlink starts.

Has anyone tried this. If so please let me know how.

 

Thanks & Regards

Farzana.

Adobe Community Professional
Correct answer by brianp311 | Adobe Community Professional

You can get the sourceText's insertionPoint, and the index of that IP within its containing object, with: 

 

 

 

hypes[i].sourceText.insertionPoints[0];
hypes[i].sourceText.insertionPoints[0].index;

 

 

 

Topics

Scripting, SDK

Views

330

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Apr 01, 2020

Copy link to clipboard

Copied

What's your existing code? You can get all hyperlinkTextSources from a doc (sorry for formatting; on mobile):

 

var hypes = app.activeDocument.hyperlinkTextSources;

for (var i = 0; i < hypes.length; i++) {

    $.writeln(hypes[i].sourceText.contents);

}

 

For more: http://jongware.mit.edu/idcs6js/pc_HyperlinkTextSource.html

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Apr 01, 2020

Copy link to clipboard

Copied

Hi Amit,

 

thank you so much I was able to go a little further with your help. I am actually looking for the Text Index where the hyperlink is applied to the word or sentence in frame.

I am trying with both Script or C++ sdk which ever gives me the result. In SDK I saw an API IHyperlinkTextDestinationData and IHyperlinkTextDestinationMarker through which we can get the location so am trying that too. But if through javascript am able to get the information that too would be great.

Thanks again.

Regards

Farzana.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 02, 2020

Copy link to clipboard

Copied

You can get the sourceText's insertionPoint, and the index of that IP within its containing object, with: 

 

 

 

hypes[i].sourceText.insertionPoints[0];
hypes[i].sourceText.insertionPoints[0].index;

 

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Apr 02, 2020

Copy link to clipboard

Copied

Hi Brian,

 

Thanks, Will try this.

Thanks once again for all the help.

Regards,

Farzana.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
FarzanaA LATEST
New Here ,
Apr 05, 2020

Copy link to clipboard

Copied

Hi Brian,

 

Thanks a lot it worked and am able to get the information required.

Regards

Farzana.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...