get data from xml file.
Copy link to clipboard
Copied
I can get data from a .fdf file and populate my forms. using "import form data", how can I import xml data?
If that is possible, then i would like to export to xml.
I have been searching java script, alot of people are asking for this, but have not yet found a definitive solution.
thank you in advance
Guy D'Amato
forms were created in Acrobat Pro DC not lifecycle.
Copy link to clipboard
Copied
The FDF format has an XML based "sibling: You can use XFDF to import and export data from a PDF form. To see what the XFDF file for your form looks like, just select More>Export Data... in Acrobat Pro DC:
On the dialog that pops up, select XFDF as the output format. You very likely will have to modify the XML data via XSLT to match the XML "flavor" you are expecting. You import XFDF via the "Import Data" menu item in the above menu.
Copy link to clipboard
Copied
That is exactly what i am looking for, can i add this as a button field in the form? So when a tech clicks the button , it pulls in the data? and when he pushes another button, it exports the new data?
Copy link to clipboard
Copied
Take a look at Doc.exportAsXFDF() - Acrobat DC SDK Documentation - Doc.exportAsXFDF() - and Doc.importAnXFDF() - Acrobat DC SDK Documentation - Doc.importAnXFDF()
Copy link to clipboard
Copied
Hello,
I got the importAnXFDF("/C/Users/gdamato/Desktop/Programming in Java/New Test_data.xfdf") to work. I have a button on our PDF form (run Java) , that will retrieve the data written to the file "New Test_data.xfdf". (we have a program that will over write that file for each customer we choose).
I am trying to exportAsXFDF("/C/Users/gdamato/Desktop/Programming in Java/Temp",this.getField("CompanyData").value+".xfdx" )
note: "CompanyData is a valid field in the form
It keeps opening up a browser, for me to manually save the doc.
any suggestions?
Copy link to clipboard
Copied
Read the documentation carefully, especially the Note...

