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

getting rid of 'Javascript window' in dialog box

adoacr
Registered: May 4 2011
Posts: 41

Hi,
 
I have a pop up dialog box when my pdf is opened but
it shows the 'javascript window' notation which I dont like.
How do I make this go away? I read something about the javascript
having to be executed in a trusted context but how do I make my javascript
that executes on doc open execute in a trusted context? on a slightly different
note can I prevent the user from seeing,copying or modifying doc level javascripts?
 
Thanks

UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
You can't disable the warning message for document-level scripts, it's there for a reason. Only folder-level scripts can avoid it.

Securing the PDF will prevent people from being able to read your scripts, but unless you use a truly-secure method (such as LiveCycle DRM) it is relatively-trivial to bypass. Acrobat JS cannot be pre-compiled into JSX (as you can for example with Photoshop scripts).
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You could obfuscate your code using a 3rd party program, but that could easily be reversed engineered with a little time and patience.

Even with the supplied Acrobat JS library being pre-compiled, one can still print out the plain text of the code. Enter AFNumbe_Format into your JS debugging console, highlight and depress the numeric keypad Enter key.

George Kaiser

UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
There are a small number of functions within the library which use non-native code, and these will output to the console (i.e. they support toString) - but the majority of functions in the JSAPI are native and all you'll ever get is "native code" as an output.


gkaiseril wrote:
Even with the supplied Acrobat JS library being pre-compiled, one can still print out the plain text of the code.
adoacr
Registered: May 4 2011
Posts: 41
I have no problem with Livecycle RM except that it is not very customizable. For e.g can I display a survey dialog box instead of the user authentication dialog box? or can I modify the user authentication dialog box to indicate the user should use only acrobat reader...? Livecycle RM also dosent seem to work very well on alternate readers