Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

Doubt hyperlink Page Destination

$
0
0

Hi Script Legends,

 

I am entirely new for hyperlink concept.

 

Requirement:

In the active document Hyperlink having "Link to Page" property. My requirement want to check the destination page.

Suppose that page should be blank page then the hyperlink want to be delete.

 

 

 

 

Using forum I try the below script:

 

var myDoc = app.activeDocument

//~ var myHyperlink = myDoc.hyperlinks.everyItem().getElements()

//~ alert(myHyperlink.length)

 

var myPageDestination = myDoc.hyperlinkPageDestinations.everyItem().getElements()

alert("myPageDestination:" + myPageDestination.length)

 

var myPageItems = myDoc.allPageItems

alert("myPageItems:" + myPageItems)

 

 

for(j=0; j<myPageDestination.length; j++)

{

    if(myPageDestination[j].pages[0].allPageItems == 0)

    {

        app.activeDocument.myPageDestination[j].remove()

        alert("sucess")

        }

    }

 

Could anyone please rewrite my program. It should be very helpful for me.

 

Thanks in advance

Beginner


Viewing all articles
Browse latest Browse all 15932

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>