Hi Monks!
I have this PDF file that I am sending to users to verify theirs information. I can pre-fill their info from a database no problem, but my question is if anyone here has worked on something like this that would allow the user to edit the information on this PDF form if they want to update something there and email it back to me, because, once I open this pdf it doesn't allow me to edit the information. I know its an Adobe thing but I am wondering is there is a way around that other than present a HTML version of the PDF to the user. I am trying to do all from the PDF form I sent out. Here is a code sample I use to serve the PDF to the user pre-filled. I am also getting this error:
Unknown resource key 'Encoding' in form field dictionary at...
I cant figured it out way since all the fields on the form has been declared in %fields, any suggestion on that as well will be very appreciated.
Here is the code:

use strict; use warnings; use CAM::PDF; my $infile = 'acc.pdf'; #template my $outfile = 'acc_new.pdf'; # new filled up pdf to serve to the user. my $pdf = CAM::PDF->new($infile) or die 'error'; my @FIELDS = $pdf->getFormFieldList(); my %fields = ( 'name' => 'Joe test', 'address' => '100 Main Street', 'account_number' => '000007', 'date' => '05/19/2011', 'place' => 'USA', ); foreach my $field ( @FIELDS ) { $pdf->fillFormFields(%fields); $pdf->fillFormFields($field => $field); #sets the value of th +e field to the field name. } close(DATA); $pdf->cleanoutput($outfile);


Thanks for looking!

In reply to Saving or emailing a filled PDF form Help! by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.