Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

How to create an URL hyperlink

Participant ,
Jun 30, 2023 Jun 30, 2023

I don't know how to create an URL hyperlink like this, with SDK:

Schermata 2023-06-30 alle 12.19.53.png

The documentation isn't clear about it, i see these methods:

Schermata 2023-06-30 alle 12.23.38.png

My doubts are about the textRange, usually the functions always require the TextRange but this would seem not, or I'm not understanding where to insert it.

Another doubt, i don't found a command to apply an hyperlink, i found kNewHyperlinkCmdBoss but i don't know if this boss apply the hyperlink or not.

 

P.S. the text that I need isn't selected by end, but i select it programmatically, so i don't use ISelectionUtils

TOPICS
SDK
611
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Jul 12, 2023 Jul 12, 2023

Hi @Stefano5C37 ,

 

You first need to create HyperLinkSource and HyperLinkDestination and then create the Hyperlink.

 

Refer the below code snippet -

 

1. Create HyperLinkSource -

Utils<Facade::IHyperlinkFacade>()->CreateHyperlinkTextSource(textModelUIDRef, startIndex, length, &outHyperLinkSource);

 

2. Create HyperLinkDestination -

Utils<Facade::IHyperlinkFacade>()->CreateHyperlinkURLDestination(db, strHyperLinkURL, &outHyperLinkDest, strHyperLinkDestinationName);

 

3. Create HyperLink -

Utils<Facade::IHype

...
Translate
Adobe Employee ,
Jul 04, 2023 Jul 04, 2023

Hi @Stefano5C37,

 

Thank you for reaching out. We recommend referring to this article, "https://helpx.adobe.com/indesign/using/hyperlinks.html," as it provides valuable information on the subject that may assist you.

 

I am also keeping the discussion open for our experts, who might have more suggestions for you.

 

Thanks,

Harshika

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 12, 2023 Jul 12, 2023

Hi @Stefano5C37 ,

 

You first need to create HyperLinkSource and HyperLinkDestination and then create the Hyperlink.

 

Refer the below code snippet -

 

1. Create HyperLinkSource -

Utils<Facade::IHyperlinkFacade>()->CreateHyperlinkTextSource(textModelUIDRef, startIndex, length, &outHyperLinkSource);

 

2. Create HyperLinkDestination -

Utils<Facade::IHyperlinkFacade>()->CreateHyperlinkURLDestination(db, strHyperLinkURL, &outHyperLinkDest, strHyperLinkDestinationName);

 

3. Create HyperLink -

Utils<Facade::IHyperlinkFacade>()->CreateHyperlink(outHyperLinkSource, outHyperLinkDest, &outHyperlink, strHyperLinkURL);

 

Regards,

Rahul Rastogi

Independent Adobe InDesign C++ Plugin Developer

iZine Solutions

rahulrastogi2@yahoo.com

skype - rahulrastogi2

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 14, 2023 Jul 14, 2023

Hi @Stefano5C37,

 

Hope you're doing well!

 

We would like to follow up on your issue. Are you able to create Hyperlinks following the suggestion shared in this post?

 

Please feel free to update the discussion, if you need further assistance from us.

 

We would be happy to help.

 

Thanks,

Harshika

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 17, 2023 Jul 17, 2023

Hi Harshika

I'm actually working on it, I'll let you know as soon as possible.

Stefano

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 17, 2023 Jul 17, 2023
LATEST

Thanks a lot rahulrastogi2,

it worked perfectly

Stefano

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