Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

xfdf how to?

Avatar

Former Community Member
I'm trying to load a pdf from an xfdf, and include data for some of the form fields.<br />To do this I have:<br />1. created a very basic form by:<br /> - opening acrobat 7 designer and opening a New document<br /> - choose "print form and submit by email"<br /> - drop a "Test Field" on the desktop from the Library<br /> - select Binding, under Object and enter the Name of "TextField1"<br /> - save it as TextField1.pdf<br />2. create a basic xfdf file:<br /><?xml version="1.0" encoding="UTF-8"?><br /><xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"><br /> <f href="TextField1.pdf"/><br /> <field name="TextField1"><br /> <value>Mozart</value><br /> </field><br /></xfdf><br />3. open the xfdf file using a browser, which:<br /> - opens the xfdf<br /> - subsequently opens the TextField1.pdf as specified in the xfdf file<br /><br />All this is good, except I expect to see the value: Mozart in the text field in the form and it isn't there. It seems that the field and its value is being ignored.<br /><br />All the rest of the selections are default, but from the documentation I can't figure. What am I missing?<br /><br />Thanks<br />Steve
4 Replies

Avatar

Level 7
I may be completely wrong here, but aren't XFDF file intended for use

with Acroforms (forms made with Acrobat) rather than XFA forms (forms

made with Designer)?



Aandi Inston

Avatar

Employee
Aandi is correct. Forms created with Designer create XML based on the structure of the form and/or the fields.



XFDF works with forms created with Acrobat Form Tools (In Acrobat 7 : Tools > Advanced Editing > Show Forms Toolbar)



You're mixing and matching up your XML types. Best bet. After you create your form in Designer, save as PDF then open in Acrobat 7 and then fill in your fields and select File > Form Data > Export Data from Form... the XML file you get will show you how to create an XML file to populate that form.



Hope this helps.

Avatar

Former Community Member
Thanks for the direction Lori. I tried your suggestion, and was still not able to make it work... though the issue is different now I think. Here's the rest of the story...

- I have a web page that runs a cgi.

- Through the cgi the users select items from a database.

- The cgi prepares the data (in an xfdf file or xml??)

- and then returns the file to the browser.

- based on the extension (.xfdf), the browser starts the reader

- the reader parses the file

- sees the file reference to the associated .pdf file

- gets the .pdf file

- merges the data returned from the cgi

- displays the pdf form for the user

- the user then proceeds to update and complete the form for printing



I was able to get the xml as described in the previous post, but explorer won't launch the reader for a filetype of .xml. Also, it isn't clear how to reference the .pdf file inside the .xml.



ANYWAY, I'm also wondering if I'm missing an important point. Adobe Designer vs. Acrobat. It seems that forms created with Designer just don't accomodate what I'm trying to do. Either that or something is broken.



As always, comments and direction are much appreciated.

Thanks

Steve

Avatar

Former Community Member
The xml extension simply means it is an xml file that any xml compliant program can read and use. Check out the extensions xfdf or xdp. You should get these options when you go to export the form data. They contain a section that specifies the location of the original PDF form that the data is to be filled into (which you can change to your url). FDF is another format but it will not work with XFA forms that Designer generates (so forget about using the FDF toolkit). AFAIK if you export to an actual XML file you would have to open the PDF again and import the XML file itself with the import form data menu option...a manual process...which is not what you want. XFDF and XDP files will load the associated PDF for you and then fill in the data it contains, much like the FDF files do for AcroForms.



One caveat is to use all AcroForms or XFA forms. Don't mix and match or you will have to keep switching between FDF and XFDF/XDP on your data files.



Scott