Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Converting PDF file to XML

Avatar

Former Community Member
I am trying to maka a PDF form which a user can fill while being offline, but later he needs to convert this form into XML file to send the data back to us.

but where I am struck is with how to let user convert this form to a xml file with ease
13 Replies

Avatar

Former Community Member
You cannot convert the file to XML per se but you can export the data out of the form to an XML file. You can do this by using the Forms/Manage Form Data/Export Data.

Avatar

Former Community Member
well i got your point, bt wht i wnt is that the user clicks a button, and the data of the form is exported to a XML file.........how cld i do this??

Avatar

Former Community Member
On the click event of the button put the code:



xfa.host.exportData("", false)



The user will have to choose a filename. You cannot just save a file programmatically without the users OK.

Avatar

Former Community Member
yes i get your point....k its fine if the user provides the xml files name....bt wht to do next....i m a newbie into this task

Avatar

Level 4
Basically, you have several options for submitting form data to the server for further processing:

-You submit your form by email

-You can submit through a webservice

-You can make an HTTP submit



If you submit your form as PDF you can extract its data using "Export Data" operation of LC Forms. Are you using LC Components on the server side or have custom application? Can you specify what kind of solution do you need?



Oguz

http://www.kgc.com.tr

Avatar

Former Community Member
wht i actually require.....is as follows....

-the user downloads the form.....

-fills the form at his ease......even if he is offline, i mean he doesnt need to connect to internet to fill this form.

-then later he export the data to an XML file.....by the use of an button on the form which lets it to make a XML file on his local computer...while he is still offline......

-then he uploads the XML file on the website.....

-from here onwards i read the data from the XML file and send the data to database server.....



this is all dat i require

Avatar

Former Community Member
You can export the data out of the form by using the Forms/Manage Forms Data/Export Data menu in Acrobat or you can add a button to the form and use this command on the click event:



xfa.host.exportData("", false);



This will allow the user to choose a location to store the xml file that will represent the data in the form.

Avatar

Former Community Member
Hello Oguz,

Can you please explain how can I extract the data out of the PDF file?

The file type that is submited is PDF, then I need the option to exrtact the data out.



Thanks

Ami

Avatar

Former Community Member
HI Sankalp Shekhar,

I am also in the same boat. I need to save the data XML Data in my C:/E: Drive, then i need to pass this to a webservice.

Can u explain me how to save the data in server when we click on Submit button Which Option do i need to select and all possible ways.



Thanks in advanve..



Regards

-Adi



Aditya_Marla@Countrywide.com

Avatar

Former Community Member
Hi,

Still i am not able to save the PDF in XML in my Local System can anyone send me an example.



Thanks and Regards



Aditya Marla

Avatar

Former Community Member
If you are using Reader then it must be Reader Extended to allow for this. The good news is that Acrobat will turn on this bit for you. Once if is Reader Extended you can use the menu item to save it locally.



Note that if you submit the data then you do not need to Reader Extend it.