This content has been marked as final. Show 5 replies
I have successfully used it in LiveCycle Designer forms, but not in version 7 forms. Have you tried in a more current version of Designer?
My designer is 8.05.
Perhaps you can tell me what I'm doing wrong. Here are two methods I've tried:
AddWatermark = app.trustedFunction( function ( docptr)
cDIPath: "/C/temp/A425.jpg" (I've also tried pdf)
Menu that calls it:
cUser: "Test Designer Form",
In the form itself, I've added a button.
In the click action:
I've tried wrapping the above in a beginPriv()/endPriv() but that causes an exception on the app.beginPriv()
Thank you for your help.
BTW, when I was talking about version 7 I was just pointing out that the code works fine when I'm using an AcroForm as opposed to a LiveCycle form. This tells me, I think, that the syntax is correct.
You may want to clearly read the documentation. Note that for addWatermarkFromFile it says:
Note:Can only be executed during a batch or console event.
It DOES NOT say "application initialization" events, which is what folder-level scripts are. Your only options to run this method are during a batch sequence, from the console manually or via the JSObject from an external application.
NotAllowedError: Security settings prevent access to this property or method.
I also tried with a certified document, still gives the security violation.
I was able to get around that, even according to the documentation, by putting it in a trusted function. That doesn't work anymore then?