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

Select or highlight Destination Text

Participant ,
Sep 19, 2022 Sep 19, 2022

Copy link to clipboard

Copied

 

 

In my content file generating Hyperlink on Text (format is Times, 8)

 

and Hyperlink Text Destination on same Text with diff format (Times, 9)

 

Now, in PDF file when user clicks on the Link, is there any way to select Destination Text OR Highlight the Destination Text OR put the cursor blinking, as there are lot of content in the file so it is difficult to identify the Text on which it is jumped...?   

 

  

 

++++++++++++++++++++++

 

Below is the code

 

   //find R Number is Hyperlink and Ref is Hyperlink destination

 

   app.findGrepPreferences = app.changeGrepPreferences = null;

 

   app.findGrepPreferences.properties = ({findWhat: "(R+[\\d]+)", pointSize:"8", appliedFont:"Times"});

 

   var RNumberObject = doc.findGrep();

 

           

 

   var hName, hypTextDest, hypSource, hyperlink, destNumberObject;

 

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

 

      

 

        hName = RNumberObject[i].contents;

 

   

 

        app.findGrepPreferences = app.changeGrepPreferences = null;

 

        app.findGrepPreferences.properties = ({findWhat: hName, pointSize:"9", appliedFont:"Times"});

 

        destNumberObject = doc.findGrep();

 

       

 

        if(destNumberObject.length > 0) {

 

               

 

            hypTextDest = doc.hyperlinkTextDestinations.add(destNumberObject[0], {name: hName});

 

            hypSource = doc.hyperlinkTextSources.add(RNumberObject[i], {name: hName});

 

            hyperlink = doc.hyperlinks.add(hypSource, hypTextDest, {name: hName, borderStyle: HyperlinkAppearanceStyle.DASHED, visible: true});

 

        }

 

    }

TOPICS
How to , Scripting

Views

240

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
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 21, 2022 Sep 21, 2022

It's not possible to code something in InDesign so that a link's destination is selected in any visible way in the PDF.

Votes

Translate

Translate
Community Expert ,
Sep 21, 2022 Sep 21, 2022

Copy link to clipboard

Copied

It's not possible to code something in InDesign so that a link's destination is selected in any visible way in the PDF.

Votes

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
community guidelines
Participant ,
Sep 21, 2022 Sep 21, 2022

Copy link to clipboard

Copied

Is it possible by scripting in Adobe PDF, to get the Hyperlink Text on which I've clicked?

So by finding the same Text and Highlight it in next occurance.

 

Thank you.

 

 

 

 

Votes

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
community guidelines
Community Expert ,
Sep 22, 2022 Sep 22, 2022

Copy link to clipboard

Copied

LATEST

Maybe. You'd have to ask in the Acrobat forum.

Votes

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
community guidelines