Skip to main content
srothmanPM
Participant
February 21, 2019
Answered

Exporting Form data as FDF file?

  • February 21, 2019
  • 2 replies
  • 4572 views

I would like a simple way to export form data in a PDF as an FDF file. Currently, i can do it manually: Prepare Form > More > Export Data > Save

But I would like a button or action or something to do it with one step.

I found this page explaining how to make a button to do it: Setting action buttons in PDF forms, Adobe Acrobat

But this procedure only will upload the form data to a webserver or as an email with an attached FDF file. I just want to save the FDF file, with the same name as the source PDF, in the same directory.

Any ideas?  Thanks very much. -Steve

Correct answer try67

It's possible to do it but you would need to write a script with a trusted function and then place it in the application's Javascripts folder.

2 replies

Thom Parker
Community Expert
Community Expert
February 21, 2019

Here's an article on saving a PDF with a script. The technique is exactly the same as saving an FDF file.

https://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript

Here's the JavaScript reference entry for the function you need to save an FDF.

Acrobat DC SDK Documentation

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
February 21, 2019

It's possible to do it but you would need to write a script with a trusted function and then place it in the application's Javascripts folder.

Jovado
Participating Frequently
January 21, 2025

Hi,

I know it is an old thread, but I tried to create an export option useable in Reader. I put this script in the privileged Folder:

 

myExportFunc = app.trustedFunction(function(eDoc,ePath)
{
app.beginPriv();
eDoc.exportAsFDF({cPath:ePath});
app.endPriv();
});

 

and called it with

 

var thepath = "/C/Users/Me/Desktop/example.fdf";

myExportFunc(this,thepath);

 

It works fine in Pro version but Reader does nothing. Am I missing something?

Bernd Alheit
Community Expert
Community Expert
January 21, 2025

It is possible  in Acrobat Reader when the file has Forms Rights.