I apologize, as it seems to be this topic likely has already been covered. But, I just can't find any historical threads using the "Search Forums" function.
So, here goes:
I need some sample Perl script that would essentially allow a user to send their PDF form results to a recipient's e-mail address without the user having to use their own e-mail application or a Web-based e-mail account (such as Yahoo! Mail or Google Mail.)
The reason is this: Imagine a user at a public kiosk that has no e-mail and no access to Webmail (security filters prevent public access to Webmail accounts, etc.)
The only method that would remain for getting the form submitted would be via the http submit button. My server can only accommodate Perl script. So, it has to be Perl that would process the PDF form data.
I am no good at Perl, but if I could find a sample file of Perl that does what I described above, I can modify it for my server environment, I am sure.
One last requirement: The person receiving the form data needs to be able to view the data as it appeared to the sender in the original PDF. I think this can be accommodated easy enough, but thought I had better mention that, too.
I'm desperate for a solution, as I've spent about four days researching this to no avail. All the documentation suggests this can be done, but I can't get any further than that. Thx in advance!
Ben
Acrobat's connection to the outside world is guided by a very narrow and strict security policy. In certain situations, users are given the option to select an email server, but this cannot be controled from the documet. So you are very much correct in the methodology you've outlined. The PDF data needs to be sent to a server via HTTP Post, where it is rerouted to an email server.
Read this article on submitting PDF data.
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/submitting_data/
Perl CGI scripts are pretty simple. If there are only a few fields on the form, with short data (no long paragraphs of text), then you could get away with an HTTP GET that places the data into the HTTP request header. In this case, there is no difference between processing data from an HTML form and processing data from a PDF form. Find and download "CGI.pm". This is a standard Perl header that will do all the heavy lifting for you. You'll find all the information you need in books on Perl CGI and online. There's tons of info.
If however the PDF form has a lot of data, or large data. then you will need to use an HTTP post, which puts one of the PDF data formats into the body of the HTTP Request. In this case you'll need to extract and parse the body content according the the content (mime) type and length in the header.
You'll find everything you need on the Perl/CGI web sites. Once you have the data parsed out of the HTTP request, it's a matter of emailing it off. This is purly Server/CGI scripting. Somthing else you'll find on the Perl/CGI web sites.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script