1 Reply Latest reply on Mar 20, 2014 12:06 PM by larrcoppale

    How to call function addRequirements

      Hi,

      I'm trying following line from the "JavaScript for Acrobat API Reference":

      addRequirement(this.requirements.EnableJavaScripts, {[{cType: reqHandlers.JS, cScriptName: "requirement"}]});

      Acrobat says: "Invalid property id". Without cType and cScriptName everything is fine. Does anyone know how to use this?

      Thanks,
      Christian Wiesbauer
        • 1. Re: How to call function addRequirements
          larrcoppale

          Hi,

           

          I did a simple copy paste from the Acrobat XI Documentation and I had the same issue.

           

          In fact the correct syntax is:

               addRequirement(this.requirements.EnabledJavaScripts, [{cType: "redHandlers.JS"; cScriptName: "reuirement"}]);

              

          You just need to remove the external accolade over second the parameter.

           

          Hope it helps at least someone.

           

          Cheers,

          David Corral