Copy link to clipboard
Copied
How can one select all the hyperlinks in a document (there could be thousands) and change their style at one time? Of particular importance to me is being able to set the Highlight Style to None.
Copy link to clipboard
Copied
Hello @try67
Just had a chance to learn about and try out the JS Console, etc.
I'm in the JS debugger, Console mode selected, and after copy and pasting the script you sent, I do Control Enter, with the cursor at the end of the script, but it complains Syntax error 1 console exec undefined.
Keeping in mind my lack of experience, what's a likely reason for this?
Thanks so much!
Copy link to clipboard
Copied
You must select the full code first, using the mouse or keyboard.
Copy link to clipboard
Copied
You can place it under a Custom Command or an Action for quick access.
Another option is to place it in a .js file and attach it to a new menu or toolbar button, but that requires some changes to it.
The "None" at the end is just the highlight value that is being used. It means the code ran, actually.
Copy link to clipboard
Copied
You need to resize your links so they don't exceed (or overlap) with the page's boundaries for the script to pick them up.
You can set the default view options for the file (including Full Screen) under File - Properties - Initial View.
Copy link to clipboard
Copied
I'ts not possible out of the box, but @try67 could probably write a script to accomplish that.
Copy link to clipboard
Copied
I've been summoned... 🙂
Here you go:
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";
}
}
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Android for Windows?? Do you mean Acrobat for Windows, perhaps?
You can run this script from the JS Console, or you could attach it to a Custom Command or an Action (in Acrobat Pro). The former will allow you to run it on the current file with a single click. The latter will allow you to run it on multiple files, with just a few clicks (make sure to also add a Save command, if you do that, though).
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hello @try67
Just had a chance to learn about and try out the JS Console, etc.
I'm in the JS debugger, Console mode selected, and after copy and pasting the script you sent, I do Control Enter, with the cursor at the end of the script, but it complains Syntax error 1 console exec undefined.
Keeping in mind my lack of experience, what's a likely reason for this?
Thanks so much!
Copy link to clipboard
Copied
You must select the full code first, using the mouse or keyboard.
Copy link to clipboard
Copied
All the code, about 8 lines, is selected and highlighted. I then pressed Ctrl Enter, and the script returned None. And Lo! and Behold!, all the highlighting has been removed.
Now, what's an easy way to save the script for future use?
Copy link to clipboard
Copied
You can place it under a Custom Command or an Action for quick access.
Another option is to place it in a .js file and attach it to a new menu or toolbar button, but that requires some changes to it.
The "None" at the end is just the highlight value that is being used. It means the code ran, actually.
Copy link to clipboard
Copied
Got it... Let me read up on how to use Custom Command or Action. I have found them but need to get oriented on how to use them, etc.
Many thanks!
Copy link to clipboard
Copied
BTW how does one force a PDF to open in Single Page View, or in Full Screen?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
You need to resize your links so they don't exceed (or overlap) with the page's boundaries for the script to pick them up.
You can set the default view options for the file (including Full Screen) under File - Properties - Initial View.
Copy link to clipboard
Copied
Finally, is it possible to prevent a reader from navigating beyond a certain page? They can read from page 1 to x, but not beyond.
For example, in my presentation, there are some pages with images at the end, which we call from the hyperlinks and they popup as expected. However, I'd like to make them hidden, so to speak, when using the ordinary navigation process.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now