Copy link to clipboard
Copied
Is there a way to change the appearance of multiple links at one time? An overall setting/preference for link appearance? Specifically looking to change link type from 'visible rectangle' to 'invisible rectangle'. It's painstaking to edit every single link individually.
You can do it using this code:
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 = 0;
}
}
Copy link to clipboard
Copied
You can do it using this code:
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 = 0;
}
}
Copy link to clipboard
Copied
Thank you! I'm not very familiar with javascript (just enough to be able to run that or put it in an action). Would you be so kind as to help me understand what parts of that I need to edit to make it work for my document?
Copy link to clipboard
Copied
Don't edit anything. Run it as-is.
Copy link to clipboard
Copied
Thank you!! Had to play with it a little, but that's user error - your answer was spot on and will save me a lot of time. What I actually ended up needing was to change the highlight style from "Invert" to "None", so replaced borderWidth with highlightMode, for anyone looking for this in the future:
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].highlightMode = "None";
}
}