I have created an PDF form with a submit button. How do you get the data from the pdf to the web server using CGI. I have some knowledge of perl scripting. I have used a CGI parsing script to receive HTML form data and store it as an text file on the web server. But this same script will not work on PDF's. I have read the sdk in regards to perl, but I still can not connect the dots. In the CGI script do you save the "data" as a *.txt, *.fdf or *.pdf ? What is the parsing code needed ? Here is a sample of the parsing code I use for HTML forms.
sub get_form_data
{
# GET the input
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
# Split the name-value pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
# Un-Webify plus signs and %-encoding
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s///g;
$FORM{ $name } = $ value;
}
You do lose the flexibility that comes from submitting in FDF format,
though.
Aandi Inston