Sorry, I meant to mention we're using Acrobat 8 on the mac, but looking to upgrade in near future. Lee
1 person found this helpful
along with the Link object properties: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.802.html
Post again if you get stuck.
I don't know what control you have over this on the InDesign side of things. You may want to ask in one of the InDesign forums if you haven't already.
I was also wondering if its possible to bulk update the height of hyperlinks without actually needing to write a script? It seems I can nearly do it:
Go to Tools > Advanced Editing > Link Tool. This shows a box around all the links in the document.
I can then hold the shift key and select multiple hyperlink boxes, then Right click and select size > Height. At this point I'd assume I could change the height of the selected hyperlink boxes but nothing happens. Any ideas?
Thanks : )
1 person found this helpful
Where's the fun in that?
But seriously, if you change the height of one of the links and then select one or more links so that the one that is changed has the dark blue border color (as opposed to the light blue of the others), you can right-click and select Height and all of the links will get the same height. I prefer to use the Object Select tool, which allows you to drag out a rectangle. Any links that the rectangle touches will be selected, with the topmost one highlighted. This is easier to demonstrate than describe, so I hope you'll get the idea.
You'll notice the other possible operations, including distribute and align, which may come in handy also.
Thanks George - both your answers have been very helpful.
Is it possible to merge to link areas, such as for a url that breaks over 2 lines?
I seem to only be able to have it as 2 seperate links (though they both function fine).
Yes, it's possible to combine two (or more) links, by editing the rect
property of the first and deleting the second.
Be aware, though, that it's not possible to check that the two links
actually point to the same URL (Acrobat JS has no access to this
information), so be careful when doing so.
That's not possible. A link must have a rectangular form.
Since my original post I have been bulk selecting links and changing the height of the links manually. As the various documents I have been working on are getting more complex this is becoming cumbersome and I think I need to move to a script that bulk updates all links to a lower height so they don't overlap in things like the table of contents.
I'm thinking I need a script that does something like :
1. Loop through each link in the open document
2. For each link get the 'rec' property ie. the coordinates of the link.
3. Move the upper coordinate down 2mm - so that the height of the link box reduces by 2mm. The bottom coordinate of the link box stays the same.
4. Go to the next link box and do the same.
Many thanks. HJ