Actually after further testing, it has nothing to do with hostcontainer.
I have a button that on mouseUp calls a trusted function. This works fine when running Acrobat XI Pro. When I embed the PDF as an object in a web browser, the same button click that calls the trusted function throws the "trustedFunctionNameHere is not defined" error.
My folder level script is here:
Is the folder level script not called when running Acrobat in a web browser? If it is called, how come it can't be found when the PDF is in a web browser?
What PDF viewer do you use in the web browser?
Acrobat plug-in for FireFox.
I'm just really stumped. Is it supposed to be possible to call a trusted function from a PDF embedded in a web browser?
Have you tired the code in Reader outside of the web browser?
I am using Acrobat via browser and can't call the trusted function. It says function "is not defined". It works fine when running as a console app (native).
I can successfully call the trusted function from native Acrobat and native Reader. There are no JS errors reported in the console.
The web browser runs Acrobat and that's where the issue occurs. It's as though the folder level scripts aren't called when using Acrobat via browser--that's why the function undefined errors?
Are there any errors reported when in the browser?
We need the exact text.
Can you provide a copy of the code?
There are no browser errors.
folder level script:
zzz = app.trustedFunction( function ()
app.alert('user trusted function called!');
button mouse up handler:
Clicking the button in native Acrobat works perfectly--I get the app.alert. Clicking the button via web browsers throws an error with this message:
"zzz is not defined"
I have no problem using this in a web browser. May be that you use another PDF viewer.
I rebooted my computer and now it is working. Not sure why that was the case but thank you for your help!