Select or highlight Destination Text

Explorer ,
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

73

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

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
community guidelines
Explorer ,
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.

 

 

 

 

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
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.

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