Diff for /loncom/interface/lonpdfupload.pm between versions 1.18 and 1.19

version 1.18, 2010/03/18 19:11:05 version 1.19, 2010/03/22 15:33:38
Line 192  sub get_pdf_data() { Line 192  sub get_pdf_data() {
     my @data = ();      my @data = ();
     my $pdf = CAM::PDF->new($env{'form.file'});      my $pdf = CAM::PDF->new($env{'form.file'});
   
     my @formFields = $pdf->getFormFieldList(); #get names of formfields      if($pdf) {
               my @formFields = $pdf->getFormFieldList(); #get names of formfields
     foreach my $field (@formFields) {  
  my $dict = $pdf->getFormFieldDict($pdf->getFormField($field)); # get formfield dictonary  
   
         #          foreach my $field (@formFields) {
         # this is necessary because CAM::PDF has a problem with formfieldnames which include a              my $dict = $pdf->getFormFieldDict($pdf->getFormField($field)); # get formfield dictonary
         # dot in fieldnames. So a fieldname like "i.am.aFormfield" will offer three fieldnames "i", "i.am"   
         # and "i.am.aFormfield". The fragmentary names keep no values and will be ignored.              # this is necessary because CAM::PDF has a problem with formfieldnames which include a
         if($dict->{'V'}) {              # dot in fieldnames. So a fieldname like "i.am.aFormfield" will offer three fieldnames
             push(@data, $field."?". $dict->{'V'}{'value'}); #binding fieldname with value              # "i", "i.am" and "i.am.aFormfield". The fragmentary names keep no values and will be ignored.
               if($dict->{'V'}) {
                   push(@data, $field."?". $dict->{'V'}{'value'}); #binding fieldname with value
               }
         }          }
     }       }
     return @data;      return @data;
 }  }
   

Removed from v.1.18  
changed lines
  Added in v.1.19


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>