Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

get data from xml file.

New Here ,
Jun 20, 2016 Jun 20, 2016

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.

TOPICS
Acrobat SDK and JavaScript , Windows
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2016 Jun 20, 2016

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:

2016-06-20_14-17-13.png

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 20, 2016 Jun 20, 2016

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2016 Jun 20, 2016

Take a look at Doc.exportAsXFDF() - Acrobat DC SDK Documentation - Doc.exportAsXFDF() - and Doc.importAnXFDF() - Acrobat DC SDK Documentation - Doc.importAnXFDF()

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2016 Jun 21, 2016

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2016 Jun 21, 2016
LATEST

Read the documentation carefully, especially the Note...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines