Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

exportAsFDF not trusted

New Here ,
Jul 07, 2020 Jul 07, 2020

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?

 

TOPICS
How to , PDF forms , Windows
696
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 07, 2020 Jul 07, 2020

See the JS API Reference (picture)

Untitled.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 07, 2020 Jul 07, 2020

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?

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 07, 2020 Jul 07, 2020
LATEST

Yes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines