Unable to access NET.HTTP in acrobat reader dc, but I am able to run it using Acrobat Reader DC Professional.
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();
}
});
