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

Export form data to xml with javascript

MasterPrintInc
Registered: Jun 14 2010
Posts: 5

Hello,
I was wondering if there is a way to automate the export of an Adobe PDF Form to XML.
What I'd like to do is create a Button that will export my form data to xml, using a javascript.
Similar to Selecting in Acrobat-Menu-
Forms>>Manage Form Data>>Export Data…>>Format XML Files
I only have Acrobat Professional…. any help would be greatly appreciated.

My Product Information:
Acrobat Pro 9.3.1, Macintosh
try67
Expert
Registered: Oct 30 2008
Posts: 2399
Have a look at the reference for the methods exportAsXFDF and exportXFAData of the Document object.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

MasterPrintInc
Registered: Jun 14 2010
Posts: 5
Thanks for that suggestion…... But it has to be .xml and not Acrobats XFDF…;( . I understand it is xml based, but I really need it to be .xml. I think I've read somewhere in the forum that you can create a javascript so that when you create a button to execute a javascript - it can export form data as xml. I just need it to export that xml to a job folder on our server. Everyone in our company has Acrobat Pro and the pdf won't need to be certified. Again thanks for the help.
try67
Expert
Registered: Oct 30 2008
Posts: 2399
If you use exportXFAData and specify bXDP to be false, the result will be a plain XML file.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com