Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
See the JS API Reference (picture)
Copy link to clipboard
Copied
Thank you Test_Screen
Didn't notice that.
If I read the manual correct, I can buy Acrobat Standard 2020 as a single program, and it will work there?
Copy link to clipboard
Copied
Yes.