Skip to main content
Participant
Jul 2, 2020 8:48 AM UTC
Answered

How to highlight my hyperlinks?

I have a pdf file with many hyperlinks, all of them work well when clicking on them, also the hand icon appears when hovering on them, but they are not highlighted so users do not notice them.

 

I can highlight them one by one right-clicking on them > Edit Link > Link Type == Visible rectangle & Color == blue but this is not efficient.

 

Example:

In the following text the red-underlined text are hyperlinks and work well, the 1st one is intuitive because it has url nomenclature, but the 2nd one is not noticeable:

 

 

I am looking for a way to highlight all my hyperlinks automatically.

 

I am using Adobe Acrobat Pro DC. 

PDF Version: 1.4 (Acrobat 5.x)

 

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Jul 4, 2020 9:42 AM UTC

You can use this code to edit all the links in the file in this way:

for (var p=0; p<this.numPages; p++) {
	var box = this.getPageBox("Crop", p);
	var links = this.getLinks(p, box);
	if (links==null || links.length==0) continue;
	for (var i in links) {
		links[i].borderColor = color.blue;
		links[i].borderWidth = 1;
	}
}

 

And since you have Acrobat Pro you can even use it in an Action to process all the links in multiple files in a single process.

 

PS. You should post your questions in the Acrobat forum in the future...

9 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Jul 4, 2020 9:42 AM UTC

You can use this code to edit all the links in the file in this way:

for (var p=0; p<this.numPages; p++) {
	var box = this.getPageBox("Crop", p);
	var links = this.getLinks(p, box);
	if (links==null || links.length==0) continue;
	for (var i in links) {
		links[i].borderColor = color.blue;
		links[i].borderWidth = 1;
	}
}

 

And since you have Acrobat Pro you can even use it in an Action to process all the links in multiple files in a single process.

 

PS. You should post your questions in the Acrobat forum in the future...

Translate
rubenperAuthor
Participant
Jul 10, 2020 8:55 AM UTC

this worked great, thanks

Translate
Legend
Jul 2, 2020 11:52 AM UTC

Highlight in the original document. Too late once it’s a PDF. 

Translate