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

Submit PDF form

sweta pandya
Registered: Mar 13 2009
Posts: 4

I have created a PDF form by using Adobe LiveCycle Designer 8. Now i want to get data from pdf & insert into database(first user login & then insert data of particular user).

i tried by simple button (with control type: submit) & HTTP Submit Button, when i am clicking on button login jsp open (specified in URL) in adobe acrobat professionl not in internet explorer browser why this happen?

is this possible with using buttons & how i get data at server site?

if any other good way for my requirement please post here.

My Product Information:
Acrobat Pro 8.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
When you submit data from Acrobat to a server, Acrobat wraps the data up in the specified format and sends it in an HTTPRequest to the specified URL. The recieving server script has to grab this data, do somthing with it, and then send back, in the HTTP Response, something that Acrobat can use. If the server script returns HTML, Acrobat will most likely try to convert it into a PDF. Reader will usually open a browser window and display the web page. Obviously this isn't what you want.

There really isn't any built-in methodology for handling login on data submit. The log-in needs to happen separately. Or it needs to be built into the data in the form. There are ways to handle a multstop process where the user would provide login info, but you'd need to learn quite a bit about how Acrobat works.

For example, on the submit button you could have a popup window that collects the user's name a password, encrypts it, and then sends it to the site for authentication. If the login is good, the server script returns data to the form that directs it to submit the form data. If it's not good, then it sends data that causes Acrobat to popup an Alert message.

You can find some information about server side data handling on this forum by searhing for "PHP", "Submit Data", and "server side"

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

sweta pandya
Registered: Mar 13 2009
Posts: 4
Hi thomp,

I have tried with submit button as you said to get HTTPRequest when submit form but when i set submit as PDF at that time only (not for xml data, Xml data package(XDP),Url encoded data (HTTP Post))able to connect with HTTPRequest & ContentType is application/PDF. In same not able to get data from PDF,In wich formate i get data(i am working in JAVA).If user can fill PDF online & than i want to submit data into database
what are the steps for that?
which type of button used for that?
at server side how to handle that data?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
If sumitted as "PDF", then the PDF file is in the Body of the HTTPRequest. Byte for Byte, it is the same as the PDF file on your local hard drive.

To get at the data inside the PDF you have to have server side tools that can Parse a PDF. Some kind of PDF Library.

But, if you submit as FDF, XFDF, XML, or another purely data format. Then it's easy to parse and access the data on the server side. For FDF use the FDFToolkit, it's free at www.acrobat.com/devnet. How you connect to a DB in the server scrpt is your business. Acrobat just submits the data to a server script.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script