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

Can I modify the aspect of links automatically?

studiosuria
Registered: Oct 1 2011
Posts: 10

I have a catalogue of 244 pages and in each page there is a link directing to the index page. The client would like to change the aspect - INVERSE - to NONE of all the links (244). Is there a way of doing this automatically and non one by one?
Thank a lot

My Product Information:
Acrobat Pro 10.1, Macintosh
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Yes, there is. Run this code from the JS console:
  1. for ( var p = 0; p < this.numPages; p++) {
  2. var box = this.getPageBox("Crop", p);
  3. var links = this.getLinks(p, box);
  4. for (var i in links)
  5. links[i].highlightMode = "None";
  6. }

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

studiosuria
Registered: Oct 1 2011
Posts: 10
Thank you try67. I am sorry but I am not very expert in running java from the console. I did try to find the right place where to paste the script but I am a bit confused.
Could you please kindly guide me through the path?
Thank very much
renato
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Cmd+J will open the console. Delete its contents and paste the code I've provided instead.
Select all of the code with the mouse and then press Cmd+Enter.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

studiosuria
Registered: Oct 1 2011
Posts: 10
Ok, done it! Followed the steps but nothing happen. In the meanwhile, during the week-end, I changed the aspect manually….244 pages as I had to present the work to the client today. Now, I followed your instructions to learn the trick for the next work. I made a copy of the catalogue and change "links[i].highlightMode = "None";" to links[i].highlightMode = "Invertita"; as it was originally. Maybe I forget soething or I am getting old. O my Acrobat speaks only italian, or or….
Sorry and thank you for your kindness
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Your Acrobat might be in Italian, but the scripting language is in English, so you need to use "Invert".

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

studiosuria
Registered: Oct 1 2011
Posts: 10
Sorry, no way. I press cmd+J, cancel whatever is written in it, paste your code, change None to Invert, select the code, press md+ enter: nothing happens.
I do not want you to waste your time. Nevertheless it would be nice to know where is the mistake.
Have a nice day and thaks again
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Well, the code does work. Maybe your file does not contain real links but form buttons.
In that case, the code will indeed not work.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

studiosuria
Registered: Oct 1 2011
Posts: 10
Yes, maybe there is a misinterpretation of the word "link" Here is what I have done in my catalogue: in inDesign, in each page I put a colored rectangle with the text "Indice". Then, in Acrobat I selected the istrument "Links", draw a rectangle around the coloured box and link it to the apropriate page. Then copied the link and paste it on every page of the catalogue. I know that there must be a shortest way to do this but I did it wasting only my own time. But having to change the aspect of the links, knowing the time it takes to do that manually, I asked for help and I thank you again.
This is it. Thanks a lot.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
If you want, send me the file by email and I'll have a look at it.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

studiosuria
Registered: Oct 1 2011
Posts: 10
You are very kind. I shall send the file via Acrobat Sender. Just to understand If I made a mistake or if there is something wrong with my Actobat.
Thank you
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
studiosuria wrote:
my Acrobat speaks only italian
Go to the Apple menu : System Preferences : International : and select English as default language (put the item on the top of the list)

Quit and restart Acrobat, then reset the International panel as before (Italian I guess).
Now Acrobat should displays in English.

This works fine for French and German Acrobat's versions, I didn't test in Italian.

;-)
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
studiosuria wrote:
my Acrobat speaks only italian
Go to the Apple menu : System Preferences : International : and select English as default language (put the item on the top of the list)

Quit and restart Acrobat, then reset the International panel as before (Italian I guess).
Now Acrobat should displays in English.

This works fine for French and German Acrobat's versions, I didn't test in Italian.

;-)
studiosuria
Registered: Oct 1 2011
Posts: 10
Ciao Merlin, thank you for the suggestion, unfortunately my acrobat does not like me and it does not behave as you all suggest it should.
The problem still exist. I begin to believe that there must be something wrong with my system.
Have a nice day

try67
Expert
Registered: Oct 30 2008
Posts: 2398
Before jumping to conclusions, send me the file...

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

studiosuria
Registered: Oct 1 2011
Posts: 10
Try67 the file is coming via Adobe SendNow. thank you
try67
Expert
Registered: Oct 30 2008
Posts: 2398
I got the file. You have indeed real links, and the script that I provided works fine with either "None" or "Invert" as the highlight mode.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

studiosuria
Registered: Oct 1 2011
Posts: 10
oh god! so what I do wrong? You write "Cmd+J will open the console. Delete its contents and paste the code I've provided instead.
Select all of the code with the mouse and then press Cmd+Enter." I do it exactly. What should I expect after pressing Cmd+Enter? Is there another way to RUN the script?Could my keybord not recognize Cmd+Enter? Sorry to annoy you.

try67
Expert
Registered: Oct 30 2008
Posts: 2398
I don't have a Mac, so I just "translated" the instructions from Windows (basically replaced Ctrl with Cmd)... But maybe that's not how it's done on a Mac.
On Windows you can execute the code by either pressing Ctrl+Enter or by pressing the Enter key at the bottom-right of the keyboard. Maybe you could try that...

After the script runs it writes to the console "None" or "Invert".

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
studiosuria wrote:
What should I expect after pressing Cmd+Enter?
Nothing !

Sorry, I mess that : on a Mac you must hit SHIFT-ENTER, not CMD…

;-)
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
studiosuria wrote:
Ciao Merlin, thank you for the suggestion, unfortunately my acrobat does not like me and it does not behave as you all suggest it should.
The problem still exist. I begin to believe that there must be something wrong with my system.
Have a nice day
Running your Acrobat in Italian or in English will not solve your issue in any case.

It's just a very useful tip to get the correct menu items in English.
In France we get an "EFG" version, which means : English-French-German, but I don't know if an Italian version also embed English menu items…
studiosuria
Registered: Oct 1 2011
Posts: 10
ALLELUIA!!! Abemus Papam!!! Tanks to you both: try67 and Merlin, I finally manage to make the script work splendidly!!!
The problem was in the "Cmd+ Enter" which in Mac should be "Shift+Enter" as Merlin said, and in fact it works, fast and good.
I also managed to go around the problem creating a new Action and call for the script. I also works. Thank you try67 for the script. I shall visit your blog for other goodies.
Now I feel much better - also because this problem will be coming again with other catalogues.
Thank you very much. Have a nice day to you both.