These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Exporting, Importing, Amending Data - Inside the FDF file - what happens?

David Dunn
Registered: Oct 28 2010
Posts: 116

I am seeking a referral to a source (a book or article) that explains what happens to an FDF file and the data in an FDF file in the process of repeatedly amending and re-saving (re-exporting) data to the same FDF file.
 
I read someplace at one time that FDF files can save a complete history of data changes, and am curious about that. I would also like to know what happens during export and import with data in “read only” fields and locked fields.
 
As a part of this subject, I would like to know how a system I am developing will affect data in a saved FDF file. Specifically, I have a set of forms with common field names. One form is my “master data form,” which has over 150 data fields. I use the master form to gather all data and perform calculations, then save (export) the data to an FDF file. There are multiple amendments to the data in that file during transaction processing, so the FDF is saved, imported, amended and re-saved several times.
 
My other forms - which I call secondary forms - are completed chiefly by importing the FDF data saved from the master form. Each secondary form uses only part of the FDF data from the master FDF file. I am curious, if I amend data in one of my secondary forms and export/save/replace the master FDF file, will that process amend just the changed data in the FDF or does it completely replace the FDF with only the data from the secondary form? Instinct tells me this is more complex than I might expect, and I would like to develop a thorough understanding of what goes on behind the scenes.

David D

My Product Information:
Acrobat Pro 9.4, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
When you export the form data as FDF, it only includes the field name/value pairs that are included in that form. It includes all of the fields, whether they're read-only, locked, or otherwise.

It is possible to set up a submit action that includes a subset of the fields in a form, but not when you manually export to FDF. It is not possible to manually export and update an existing FDF that may contain a superset of the current form's fields. You have more options if you want to programmatically process FDF files.
David Dunn
Registered: Oct 28 2010
Posts: 116
Thank you George; that is helpful. On the tail of your explanation, it is also possible to export a subset of field name/value pairs with JavaScript. I've done that with a button/mouse up script, as follows below, where each text item in quotes is a non-terminal field name. This exports the entire subtree of fields that begin with each of these naming conventions. For the benefit of others, here's how I set it up as a mouse up script:

this.exportAsFDF({
aFields: ["txtSE", "txtS", "cbo.SP", "cbo.SE"],

})

David D

George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Thanks for adding that. I was thinking about using the menu item to export to FDF, not the exportAsFDF method.