Expand my Community achievements bar.

how can i export to xml?

Avatar

Former Community Member
hello, i'm trying to save the data of my form in xml format, but don't work. I make the form with designer 7.1 and i want to open the pdf with adobe reader 7.0.5, somebody can say what can i do to save the data of the form in xml format? thanks



(excuse me for my english)
7 Replies

Avatar

Level 4
Do you mean, save to an XML file on the users local hard drive, or submit the data in XML to a server? Do you have any particular XML format in mind?



Thom Parker

WindJack Solutions


www.windjack.com

Avatar

Former Community Member
I want to save the data in an XML file in user local hard drive and i haven't got a particular XML format in mind. I only want to save the data, the format is not too much important



Jose Antonio Nogales

IECISA

Avatar

Level 4
You cannot save a file from Reader to the user's hard drive unless the document has special enabling. There's an article on this at



http://www.acrobatusers.com/articles/2006/03/formrouter/formrouter.php



You can however submit data to a server. Maybe you should consider this route.



Thom Parker

WindJack Solutions


www.windjack.com

Avatar

Former Community Member
i find a way to save in local driver the data in xml format. if you include an http submit button, you've got the posibility of save the data in xml file to send later the data to the email



thanks a lot

Avatar

Former Community Member
"...............Thom Parker - 11:33am Mar 9, 06 PST (#3 of 4)



You can however submit data to a server. Maybe you should consider

this route. ..........."



this is exactly what i want to do, but I cannot find any documentation on exactly how to do this. i'm still very new to livecycle.



can you help point me in the right direction? thank you

Avatar

Level 4
There really isn't any documentation on submitting from a LiveCycle Designer Doc to a server, unless of course it's a LiveCycle server. However, there is no fundamental difference between doing this and submitting data from a regular AcroForm, so you can look up information on this.



All you need is a script on the other side to catch the data, ASP, ASP.NET, Perl, PHP, etc. Doesn't matter. On the LiveCycle PDF form all you need is a submit button. The real trick is in writing the server script. If you don't already know server scripting. you'll need to get a book and read about it. It's outside the scope of this forum. The only thing I can tell you is that Acrobat sends the data as a HTTP Post, with the form data in the body of the HTTP Request. The Mime type of the data is in the HTTP Request Header as it should be.



Thom Parker

WindJack Solutions


www.windjack.com

Avatar

Former Community Member
<br /><%<br />Server.ScriptTimeout = 10<br />Response.Expires = -1<br /><br /> LoginId = Request.Form("LoginId")<br /> dim sSQL, ConString, cnn, rs<br /> <br /> '-----------------------------------------------------------------------<br /> ConString = "UID=sa;PWD=xxxxxx;DATABASE=Acrobat;SERVER={servername};DRIVER=SQL Server;DSN=Acrobat;"<br /> Set cnn = Server.CreateObject("Adodb.connection")<br /> cnn.open ConString<br /> Set rs = Server.CreateObject("Adodb.recordset")<br /> <br /> '************ Construct SQL Statement ******************************<br /> sSQL = "SELECT Name, Phone, Id From ATable WHERE Id = " & LoginId<br /> rs.Open sSQL, cnn, 3, 3 <br /> if rs.recordcount=0 then<br /> rs.addnew<br /> rs("Id")=LoginId<br /> if len(Request.Form("Name"))>0 then rs("Name")= Request.Form("Name")<br /> if len(Request.Form("Phone"))>0 then rs("Phone")= Request.Form("Phone")<br /> rs.update<br /> else<br /> rs("Id")=LoginId<br /> if len(Request.Form("Name"))>0 then rs("Name")= Request.Form("Name")<br /> if len(Request.Form("Phone"))>0 then rs("Phone")= Request.Form("Phone")<br /> rs.update<br /> end if<br /> RS.Close<br /> Cnn.Close<br />%>
<br />Note Name, LoginId and Phone is the field names
<br />if the form is created in Designer the fieldname must be complete ie page1.form1.filename
<br />
<br />ulf.a@dtp-tjanst.se