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

Submit form to Webserver via internet

YOURCONNEXX
Registered: Mar 9 2010
Posts: 18

Ive been reading thru this forum for a week or so and i havent seem to have found a straight answer on this question. the form im creating will be a part of a website for users to fill out and submit. i made the form in acrobat 9 pro

ive went thru tutorials on how to create forms etc and got thru them with pretty much no problems. ive created a submit button via email and tested it in adobe reader 9 on my laptop (im on my desktop right now) and it worked but i dont want the form to cause the users pc to open up outlook or outlook express and then send the user thru yet another step in emailing me the form.

the form will be on a website, so i want the user to fill out the form and click the "submit" button so the pdf or fdf will go directly to my server/webhost. I DONT WANT THE "mailto: me [at] aim [dot] com" EMAIL BOX TO OPEN UP. i dont even really want the form to come back in an email.

so my question is, if i create a folder on my host and add the address of that folder to my "submit button", will the pdf (or fdf) go to that folder without using any script to get it there?? i dont mind manually going to that folder and retriving the forms. i dont really care if the form isnt put into a data base etc. as long as it gets to that folder im ok because saving each form in pdf format is good enough for the job im faced with

My Product Information:
Acrobat Pro 9.0, Windows
jimhealy
Team
Registered: Jan 2 2006
Posts: 146
When you submit an Acroform with a submit button you have 4 options:

- HTML (HTTP POST)
- FDF (Form Data Format)
- XFDF (XML Form Data Format)
- PDF Complete Document (Requires Acrobat or Reader Extensions)

All of these formats need to be handled by some kind of script on your server.

Also, you will want to make sure that each file has a unique name; otherwise you will have file name conflicts.

Jim Healy
FormRouter, Inc.
http://www.formrouter.com/tools

Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com

YOURCONNEXX
Registered: Mar 9 2010
Posts: 18
jimhealy wrote:
When you submit an Acroform with a submit button you have 4 options:- HTML (HTTP POST)
- FDF (Form Data Format)
- XFDF (XML Form Data Format)
- PDF Complete Document (Requires Acrobat or Reader Extensions)

All of these formats need to be handled by some kind of script on your server.

Also, you will want to make sure that each file has a unique name; otherwise you will have file name conflicts.

Jim Healy
FormRouter, Inc.
http://www.formrouter.com/tools
ok im clear on that. is there anywhere i can go to learn how to make or find this script?? and also how to make sure each submission has its own file name.

i really appreciate the help too. the website im doing is for a non profit organization for kids
jimhealy
Team
Registered: Jan 2 2006
Posts: 146
What you really want is to post the complete document. If you could do that then the script for capturing the post and writing the file out is trivial. The problem is really that this would require full Acrobat or a Reader Extension. I assume that a Reader Extension is right out based on price, so does everyone who you want to have submit one of these have a copy of Acrobat Standard or Pro (probably not)?

Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools

Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com

YOURCONNEXX
Registered: Mar 9 2010
Posts: 18
well what i did was create the pdf on my pc (which has acrobat 9 pro on it) and gave it a reader extension. i tested the document on my laptop, because my lap top only has reader on it (version 9). so since reader is free to all, cant i have a link to reader on the site for anyone who doesnt already have it?? the organization im doing this site for is a youth football team, so yes pretty much random people will be using the form to register their child for the team, meaning different pc set ups etc

so do you need me to post the pdf for you?? if so here it is. i may want to make some minor changes to form fields later but this is the document

http://www.yousendit.com/download/THE2ZEU0WlROQndLSkE9PQ
YOURCONNEXX
Registered: Mar 9 2010
Posts: 18
LOL .... ive been all around the net trying to find an answer to this. the fact is, it cant be done. every article has all this info (which is really just a run around) but never do they actually answer the question. i havent even seen an example php script that demonstrates this


the fact is, there is no way you can add a submit button to a pdf document, have users fill it out, and receive the form data on your server


as popular as pdf and adobe is, surely someone could give a straight answer or script that can do this. and since no one can, it obviously is not possible. ive googled so many times that i actually seen this thread in my searches like 3 times. everyone on the net who has asked this question has never got an answer in any forum or on any site
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Actually, There are a few PHP scripts and an ASPX script for handling server side data, that have been posted to this forum. I'm somewhat shocked that you haven't found anything with your searches. I've found tons, and I've also written several server side scripts for handling data submission. It's not a huge task, but you do have to know something about server side scripting.

If you do know anything about server side scripting, then it is a very simple tasks to write a test script, and see what happens when Acrobat posts to the script. This is of course the obvious thing to do.

Essentially, Acrobat sends an HTTP Request to the script. The submitted data is in the body of the request. The form of the data is given by the MIME type in the request header. All the script has to do is extract the body data and parse or save it. It's up to you what to do with the data.

I must have provided this same information a hundred times on forum posts and I've even mentioned it in several articles that are on this site. You can't be looking too hard.

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]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

jimhealy
Team
Registered: Jan 2 2006
Posts: 146
But, if he wants to send the whole document, as is, it is like I said, you need a Reader Extension, and then the script is trivial. If you don't need the whole doc, only data, then there a ton of options. Your only other option is something like our product which builds a new doc with existing data, but that is not as good as submitting the whole document. If you want to see what the HTTP post does, download our free toolbar and use the one that submits a test of your form and returns all the data pairs submitted.

Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
http://www.formrouter.com/tools

Jim Healy, Founder & CEO FormRouter Inc.
Chapter Leader AUG RTP NC
http://www.formrouter.com

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Jims right, If you don't want to write your own server side script, then the easiest, least expensive way to handle data submitted to an URL is to use the www.formrouter.com service.

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]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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

YOURCONNEXX
Registered: Mar 9 2010
Posts: 18
sorry i have to post 6 more times for my next reply to work smh
YOURCONNEXX
Registered: Mar 9 2010
Posts: 18
why they would do that i guess is some security reason
YOURCONNEXX
Registered: Mar 9 2010
Posts: 18
but it is really taking away from this thread. what if someone had a script to give me?? they probably left because the board wouldnt let them post it smh
YOURCONNEXX
Registered: Mar 9 2010
Posts: 18
thomp wrote:
Jims right, If you don't want to write your own server side script, then the easiest, least expensive way to handle data submitted to an URL is to use the www.formrouter.com service.Thom Parker
The source for PDF Scripting Info


The Acrobat JavaScript Reference, Use it Early and Often

Then most important JavaScript Development tool in Acrobat
ill cover this response in my 11th post lol
YOURCONNEXX
Registered: Mar 9 2010
Posts: 18
jimhealy wrote:
But, if he wants to send the whole document, as is, it is like I said, you need a Reader Extension, and then the script is trivial. If you don't need the whole doc, only data, then there a ton of options. Your only other option is something like our product which builds a new doc with existing data, but that is not as good as submitting the whole document. If you want to see what the HTTP post does, download our free toolbar and use the one that submits a test of your form and returns all the data pairs submitted.Jim Healy
FormRouter, Inc.
Check out our FREE Advanced Acroform Toolset:
i just need the fdf data to go to a folder on my server. i will log in get each fdf file and import it with my blank form in acrobat and save each different submission manually. because the forms have to be printed out and signed by the parents at a later date anyway.
YOURCONNEXX
Registered: Mar 9 2010
Posts: 18
this will save our VOLUNTEERS hours and hours of time (which could be spent with the kids). because when the parent comes to register and pay, all we would have to do is print out the form they already completed over the net. they would sign it and pay. this saves time rather than a parent coming in, getting a form, filling it out, getting back in line again to hand it in and pay. plus some parents have more than one kid
YOURCONNEXX
Registered: Mar 9 2010
Posts: 18
thomp wrote:
Actually, There are a few PHP scripts and an ASPX script for handling server side data, that have been posted to this forum. I'm somewhat shocked that you haven't found anything with your searches. I've found tons, and I've also written several server side scripts for handling data submission. It's not a huge task, but you do have to know something about server side scripting.If you do know anything about server side scripting, then it is a very simple tasks to write a test script, and see what happens when Acrobat posts to the script. This is of course the obvious thing to do.

Essentially, Acrobat sends an HTTP Request to the script. The submitted data is in the body of the request. The form of the data is given by the MIME type in the request header. All the script has to do is extract the body data and parse or save it. It's up to you what to do with the data.

I must have provided this same information a hundred times on forum posts and I've even mentioned it in several articles that are on this site. You can't be looking too hard.

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]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
yes .. i have been looking hard. i just find it funny how this is sooo complicated for you guys to give me a straight answer. this is not the only message board etc that ive ever posted on LOL. i know when im being helped my friend.

i know how to create a fillable pdf form and give it a reader extention

i even have a php script that sends the submitted data back to acrobat from my server in less than 5 secs

here is that script

<?php echo ''; print_r($_POST); echo ''; ?>now when i put this script on my server and point my fillable pdf form at it

it gives me this array in a new window in acrobat

Array
(
[Address_Where_Player_Resides] => 555 my Street
[CONSENT_AFFIDAVIT] => my player
[City_Borough_or_Township_In_which_Player_Resides] => my city
[County] => my county
[Date_of_Birth] => 2-29-1999
[Date_of_Registration] => 3-19-2010
[Grade] => 6
[Phone] => 555 555 - 5050
[Players_Name] => my player
[Public_School_District_In_Which_Player_Resides] => my school district
[School_in_Which_Player_Will_Be_Enrolled_This_Fall] => my school
[Zip_Code] => 12121
[age_on_may_31st] => 11
[assosciation_name] => MY TOWN MIDGET FOOTBALL
[height] => 4 foot 1
[weight] => 110 lbs
[year_consent] => 2010SO if a script that small can give me that info that quickly, why is it so hard for you guys to tell me how to simply get that same info in fdf format and have each different submission saved in some folder on my server? is it really that hard that you guys have to try to charge me?? im doing this for a non profit organization. so now you want me to charge an application fee to cover the costs of your form router service for some script that it would probably take you guys 5 minutes to write??

the fact is ... there are no threads or tutorials out there that want the same thing im trying to get. everything is about populating pdf forms with fdf data and making it pop up on your browser etc. why someone would want to make that happen i have no clue LOL. no tutorial ever just sticks to the point of creating fdf data and saving it in a folder on your server each time the form is submitted. this leads me to believe that what im asking is much less complicated than what these tutorials are calling for.


i did this tutorial down to the T and nothing happens when i click submit

http://koivi.com/fill-pdf-form-fields/tutorial.php

there is no error message, the thing seems to work fine except for the fact that all you get back is a blank pop up in acrobat .... there is no info on my server or anywhere else from my form.

I GOT THIS SCRIPT FROM THE PHP.NET WEBSITE and when i point my form to it all i get is a error message
<?php
$outfdf = fdf_create();
fdf_set_value($outfdf, "volume", $volume, 0);

fdf_set_file($outfdf, "http:/testfdf/resultlabel.pdf");
fdf_save($outfdf, "outtest.fdf");
fdf_close($outfdf);
Header("Content-type: application/vnd.fdf");
$fp = fopen("outtest.fdf", "r");
fpassthru($fp);
unlink("outtest.fdf");
?>i went as far as even looking up each function in the script to make sure i knew what it meant and what it is doing ... yeah that fine and dandy except for the fact that it doesnt work.


there are no other tutorials that cover what im trying to do. if you think there is, then how about you google and find one then. ive searched this forum and the rest of the internet. so if your not gonna help me just say it instead of giving me the run around and trying to sell me some service that probably isnt even called for for my needs
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The PHP FDF functions like "fdf_set_value" are not standard PHP functons. They are a special add on to PHP, which you have to install. And, to work properly you'll also need to install the Adobe FDF toolkit. This is all in the documentation at php.net.

However, the good news is that if all you want to do is save the FDF files locally, then you don't need to parse data out of the FDF, and hence, you don't need the FDF toolkit. All the PHP script needs to do is save the Request Body($HTTP_RAW_POST_DATA) to a file.

How you create, name, and save file data with PHP is outside the scope of this forum.

But if you need to get some data out of the submitted data for this purpose, then I would suggest submitting the data in a more accessible format, like XFDF. Since this is an XML format it is much easier to parse than FDF.

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]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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