Hi -
I am new to Acrobat from the development perspective and have a question on implementation of a form for website. I want to prepopulate the form from a mysql database. I've googled and have gotten many flavors of answers, but there's almost too much partial information - and not exactly what I need for what I thought would be a simple process (I'm not an acrobat expert, and just want to prepopulate a few fields, with a limited amount of time).
I thought that I could have a link on a webpage which passes a user ID to a php (I'm more familiar w/ php) service which would look up the user's information to prepopulate a pdf form which is then displayed to the user. The one example that somewhat matches this that I found has a pdf form w/ a button that is bound to a wsdl service that retrieves (actually, returns data fields that were sent - echoes) data which is then displayed on the form. Can I accomplish this without the 'push' for the data from the user? Are there any examples?
The work flow for this form is the user would fill out a prepopulated form and fax it to us (eventually, I'd like to see it automatically submitted to either another service or database, but since I need credit card information, we are going to require a user faxes the form to us for now).
I didn't know the whole form thing was so involved. Thanks a million for any pointers, etc, thoughts!
1. Use an Adobe server or third party product to manipulate the form on the server and then, in the PHP response return a simple web page with the PDF on it (in an object tag). Appligent (www.appligent.com) makes a form filling tool called APMerge. On the free side, there's the iText Library.
2. This is the easy and cheap method. The server script uses the MySQL data to build a PDF Data file, one of the really well know ones (FDF, XFDF, or XDP). Make sure the original PDF file is specified in the data file. Then in the response to the client, pass this file back to the user with the proper mime type specified in the HTTP Response Header. The browser will recognize the MIME type, load Acrobat/Reader, acquire the PDF file path(URI) from the data file, load the PDF file, and then merge the data in to the PDf.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script