These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Getting rid of red box around links

dmt
Registered: Nov 8 2008
Posts: 8
Answered

Hi, in some of my pdf documents internal hyperlinks are surrounded by a red box. I would like to turn this feature off but I can't find the option to do so. Can someone help me with this?

Thanks.

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
You can not turn this off, but if you have a full version of Acrobat, [b]not[/b] Reader, and the PDF is not restricted for editing, you can us the link tool to change the link's ' border type and color of the border link.

George Kaiser

dmt
Registered: Nov 8 2008
Posts: 8
Thanks. I do have the full version, and tried what you said and was able to change links one a time. Is there way to make this change globally without having to do each one by hand?
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
You can use JavaScript to set each link border width to zero:

var p, b, aLinks, l; // Loop through each pagefor (p = 0; p < numPages; p += 1) { // Get the current page's crop boxb = getPageBox("Crop", p); // Get all the links on the current pageaLinks = getLinks(p, b); // If there are any links on the current page...if (aLinks) { // Loop through all of the links on the current pagefor (l = 0; l < aLinks.length; l += 1) { // Set the link border to nothingaLinks[l].borderWidth = 0;}}} app.alert("All Done!", 3);

George
dmt
Registered: Nov 8 2008
Posts: 8
The javascript is a great idea, thanks. But I'm not sure the best way to just run a simple script like this one time. how would i do that?

I found an annoying way to do it ... I added it as an automatic action when the document will save, but then I couldn't figure out how to get rid of having an action (I had to in the end change the javascript to just a single space, I couldn't figure out how to get rid of the action completely).

Is there an easier way to just run a script like this?
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
You would normally not include such a script in the document. You can run it from the JavaScript console. For more information, read Thom's article:
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/javascript_console/

If you need to do this a lot, consider setting up a custom menu item or toolbar button that executes the code. Thom has articles on this too.

George