Skip to main content
New Participant
November 12, 2020
Answered

Activate / Deactiv desired setting on Open (PDF)

  • November 12, 2020
  • 1 reply
  • 854 views

Hi all,

I have an PDF document with some functionality. But this just works if the marked (photo) setting is deactivated. Is there a way to deactivate this setting if I ( or anyone else) opens the PDF document?

 

 

 

Thank you for your help

This topic has been closed for replies.
Correct answer try67

Open the file in Acrobat and then go to Tools - JavaScript - Document JavaScripts and create a new item (let's call it "scripts").
Delete the code that is created by default (the function definition) and replace it with the following:

if (app.runtimeHighlight) {
	if (app.alert("This document is best viewed with Fields Highlighting turned off. Do you wish to do that now?\n\nNOTE: This will also affect all other files you open. If you wish to enable it later you can do so via Edit - Preferences - Forms.",2,2)==4) {
		app.runtimeHighlight = false;
	}
}

1 reply

try67
Braniac
November 12, 2020

Yes, it's possible to embed a script in the file that will disable the fields highlighting, but you must have Acrobat to be able to do it. Also, it will affect all other files opened by the end-user, so you should at least inform them of this change before doing it.

peter5FABAuthor
New Participant
November 19, 2020

Hi Try67,

 

thanks for your answer.

Unfortunately I am not really someone who can program and know where to "save" it.

Do you know how the code has to be and where I have to save it?

That would help me a lot.

 

Sorry for the stupid questions, but I really have no idea what to do.

 

Thank you in advance.

 

Peter

 

try67
try67Correct answer
Braniac
November 19, 2020

Open the file in Acrobat and then go to Tools - JavaScript - Document JavaScripts and create a new item (let's call it "scripts").
Delete the code that is created by default (the function definition) and replace it with the following:

if (app.runtimeHighlight) {
	if (app.alert("This document is best viewed with Fields Highlighting turned off. Do you wish to do that now?\n\nNOTE: This will also affect all other files you open. If you wish to enable it later you can do so via Edit - Preferences - Forms.",2,2)==4) {
		app.runtimeHighlight = false;
	}
}