Skip to main content
Participant
June 4, 2018
Question

Unable to access NET.HTTP in acrobat reader dc, but I am able to run it using Acrobat Reader DC Professional.

  • June 4, 2018
  • 1 reply
  • 1472 views

I have created a anonymous trusted function and stored in a .js file in the folder C:\Program Files (x86)\Adobe\Acrobat DC\Acrobat\Javascripts.  When I reference this file from Adobe Acrobat Pro DC, I am able to access the function based on a mouse up event.  On a different computer that only has Acrobat Reader DC, I copied the js file to C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\Javascripts, but I get the following error:

NotAllowedError: Security settings prevent access to this property or method.

Net.HTTP.request:22:Field That account number is:Mouse Up

RoutingAndTransitInfo = app.trustedFunction(function(cURL, aDoc)
{
  if ((aDoc !== null) && (aDoc !== undefined)) {
  var params =
  {
     cVerb: "GET",
     cURL: cURL,
     oHandler:
     {
        response: function(msg, uri, e)
  {
    var string = util.stringFromStream(msg,"utf-8");
           if (aDoc.getField("Account") !== null) {
              var aPerson = JSON.parse(string)
       aDoc.getField("Account").value = aPerson.Name;
           }
}
     }
  };

  app.beginPriv();
  Net.HTTP.request(params);
  app.endPriv();
  }
});

This topic has been closed for replies.

1 reply

Karl Heinz  Kremer
Community Expert
Community Expert
June 4, 2018

There is no product called "Adobe Acrobat Reader DC Professional" - it's either the free Reader, or Acrobat Professional (or Standard). The free Reader does not support all JavaScript API functions. You can find out in the API documentation which ones are supported and which are not. The Net.HTTP function are only supported if you can add the "Forms" Reader rights. This cannot be done with just Adobe Acrobat, you need Adobe's LiveCycle server solutions for that.

Participant
June 4, 2018