Skip to main content
Known Participant
September 28, 2020
Question

PDF Export AS FDF Javascript

  • September 28, 2020
  • 1 reply
  • 1528 views

Hello, 

 

I need to export my pdf as fdf and save it server. I have script that is working, but it's not working in adobe acrobat reader. Can someone please help me know I can export in Reader. 

var fields = [];
var Arrays =[];

app.alert("Started")
for (var i = 0; i <= this.numFields - 1; i++)
{
fields.push(this.getNthFieldName(i));
Arrays = fields.sort( function(a,b)
{return a - b; } );
}

//Don't change JavaScript, expecet Domain name, otherwise It will not work
var aSubmitFields = fields ;
var cFDF = this.exportAsFDF({
aFields:aSubmitFields,
//cPath: "JHHJH.fdf",
//bAnnotations:true,
});

 

This topic has been closed for replies.

1 reply

Legend
September 28, 2020

This is as expected and documented. There are many things Reader cannot do. See the "quick bar" for exportAsFDF in the JavaScript Reference. But of course Reader can SUBMIT (not save) to a server running CGI/PHP/ASP.

Known Participant
September 28, 2020

Is there any work around, As of now, I have images on the PDF and I was exporitng it as FDF as save it. Now, I can not use export funtion in Reader, Is there any way we can achive this.

 

Thanks 

try67
Community Expert
Community Expert
September 28, 2020

You can submit the form data as an FDF file (which is attached to an email that the user can save), or export it as a string (which can be displayed to the user for saving manually), but you can't generate an FDF file directly in Reader.