Skip to main content
srothmanPM
Participant
Feb 21, 2019 4:49 PM UTC
Answered

Exporting Form data as FDF file?

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

try67
try67Correct answer
Community Expert
Feb 21, 2019 4:59 PM UTC

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.

7 replies

Thom Parker
Community Expert
Community Expert
Feb 21, 2019 5:29 PM UTC

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

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Feb 21, 2019 4:59 PM UTC

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.

Translate
Jovado
Participating Frequently
Jan 21, 2025 12:43 PM UTC

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?

Translate
Bernd Alheit
Community Expert
Community Expert
Jan 21, 2025 1:09 PM UTC

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

Translate