exportAsFDF not trusted
I have made a Pdf-document with a form.
I want to export as FDF - on Acrobat READER.
So I created a .js file, and placed in javascript folder on the computer running the reader.
File -->
var Trusted_handleIndexNo = app.trustedFunction(handleIndexNo);
function handleIndexNo()
{
app.beginPriv();
if (this.getField("indexno").value == "") {
this.importAnFDF("/c/FDFdata/noSerie/indexno_data.fdf");
var v = +this.getField("indexno").value;
this.getField("indexno").value = util.printf("%05d", (v+1));
this.exportAsFDF({cPath: "/c/FDFdata/noSerie/indexno_data.fdf", aFields:["indexno"]});
}
app.endPriv();
}
--> end file
From button in the document I call
Trusted_handleIndexNo();
But it fails in the Reader-app, but running on Acrobat Pro DC.
Fail: RangeError: Invalid argument value. Doc.exportAsFDF
Can anyone point me in the right direction, please?
