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

exportAsFDF not trusted

New Here ,
Jul 07, 2020 Jul 07, 2020

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?

 

TOPICS
How to , PDF forms , Windows

Views

533
Translate

Report

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

Copy link to clipboard

Copied

See the JS API Reference (picture)

Untitled.png

Votes

Translate

Report

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

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?

 

 

Votes

Translate

Report

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

Copy link to clipboard

Copied

LATEST

Yes.

Votes

Translate

Report

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