Skip to main content
Participating Frequently
August 13, 2023
解決済み

Identifying all hidden hyperlinks in a PDF, using Acrobat Pro for Mac

  • August 13, 2023
  • 返信数 1.
  • 7437 ビュー

I'm using the following version of Acrobat Pro on Mac OS Monterey v. 12.6.8:

I have Word documents containing hidden active hyperlinks, by which I mean active hyperlinks formatted as normal text.  When those are converted to PDF, the hyperlinks remain both active and hidden.

 

Adobe does offer an easy way to inactivate all of them:  

Tools → Edit PDF → Link → Remove Web Links

However, before I do that, I'd like a way to identify all the hidden hyperlinks in the document.  Adobe offers a way to do that as well, but it's limited to processing one page at a time:

Tools → Edit PDF → Link → View Web Links

This is what it shows (I blacked out the links).

Unfortunately, as this process needs to be repeated for each page, it's too laborious for large documents.  

Thus is there a way to do either of the following?:
1) With a single action, generate a list of all the hyperlinks in your document as a whole.  
or:
2) With a single action, format all the hyperlinks in your document in a distinctive way, making them easy to spot as you scroll through it.

 

Yes, another solution would be to remove them from the Word documents before they are converted to PDF.  Yet because of our workflow (where we are assembling many Word source docs into a single PDF), having an ability to do a final check in Acrobat would be a great convenience.  

このトピックへの返信は締め切られました。
解決に役立った回答 try67

For the latter you can use this code (you run it from the JS Console, for example):

 

 

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].borderWidth = 1;
		links[i].borderColor = color.blue;
	}
}

 

 

The former will require a more complex tool, as I said. If you're interested in hiring a professional to create it for you, feel free to contact me privately via PM to discuss it further.

返信数 1

try67
Community Expert
Community Expert
August 13, 2023

1) Kind of. You can access all the links in the file using a script, but it can't know to where they are pointing. This will require either a plugin or a stand-alone tool.

2) Yes, this can be done using a script. It can change the border color of all links to blue, for example.

A3164000858s0作成者
Participating Frequently
August 13, 2023

Thanks try67.  How would I go about making those scripts?

try67
Community Expert
try67Community Expert解決!
Community Expert
August 13, 2023

For the latter you can use this code (you run it from the JS Console, for example):

 

 

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].borderWidth = 1;
		links[i].borderColor = color.blue;
	}
}

 

 

The former will require a more complex tool, as I said. If you're interested in hiring a professional to create it for you, feel free to contact me privately via PM to discuss it further.