You can easily create an FDF file with the data for the fields. For example, using your example file, you can create fw9a_data.fdf:
%FDF-1.2 1 0 obj<</FDF<< /Fields[ <</T(c1-1)/V/Yes>> <</T(c1-2)/V/Off>> <</T(c1-3)/V/Off>> <</T(c1-4)/V/Off>> <</T(c1-5)/V/Off>> <</T(f1-1)/V(An individual name)>> <</T(f1-2)/V(Here is where the business name would go)>> <</T(f1-3)/V(Something something)>> <</T(f1-4)/V(111 somewhere st)>> <</T(f1-5)/V(Gotham City, MA)>> <</T(f1-6)/V(Requestor's name\r111 somewhere St.\rGotham City, MA)>> <</T(f1-7)/V(List_account_numbers)>> <</T(f1-8)/V(3)>> <</T(f1-9)/V(1)>> <</T(f1-10)/V(4)>> <</T(f1-11)/V(1)>> <</T(f1-12)/V(5)>> <</T(f1-13)/V(9)>> <</T(f1-14)/V(2)>> <</T(f1-15)/V(6)>> <</T(f1-16)/V(5)>> <</T(f1-17)/V(9)>> <</T(f1-18)/V(8)>> <</T(f1-19)/V(7)>> <</T(f1-20)/V(6)>> <</T(f1-21)/V(5)>> <</T(f1-22)/V(4)>> <</T(f1-23)/V(3)>> <</T(f1-24)/V(2)>> <</T(f1-26)/V(1)>> ] /F(fw9a.pdf)>>>> /ID[<B97089A55B4A6C612CDC01693E405875> <5E6E5A68A50C834B953FA17874436B87>] endobj trailer <</Root 1 0 R>> %%EOF
Using the free Acrobat Reader, I copied fw9.pdf to fw9a.pdf, filled in a few fields, then used the menu command "Document|Forms|Export Data from Form..." to create "fw9a_data.fdf". I have thrown in a few line breaks to make it readable.

If you give the user the two files "fw9a_data.fdf" and "fw9a.pdf", they can then open this in Acrobat or Acrobat Reader. (E.g., by double-clicking fw9a_data.fdf)

If you want to just create a printable PDF, you could use the command-line pdftk utility.

pdftk fw9a.pdf fill_form fw9a_data.fdf output fw9print.pdf
It's possible that CAM::PDF may be able to do this, but I haven't gotten it to install properly. In the merged file, the form data is in there twice, once as form data and once as print instructions, e.g. for the name/address field, pdftk creates this object which will tell a PDF renderer how to print the data:
10 0 obj <</Matrix [1 0 0 1 0 0] /Subtype /Form /Length 150 /Resources <</Font <</HeBo 2 0 R >> /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] >> /FormType 1 /BBox [0 0 179.66 37] /Type /XObject >> stream /Tx BMC q 1 1 177.66 35 re W n 0 0 0.50196 rg BT /HeBo 9 Tf 10.71 TL 2 + 27.34 Td (Requestor's name)Tj (111 somewhere St.)' (Gotham City, MA) +' ET Q EMC endstream endobj

The output from pdftk is a PDF file that is printable, but you can't edit and resave the data in the free Adobe Reader. (You might be able to edit it in full Adobe.) The IRS forms are editable in Adobe Reader because the IRS paid for an expensive Adobe product that signs the file. (See http://seclists.org/lists/vulnwatch/2003/Jan-Mar/0103.html and http://weblog.infoworld.com/udell/2003/09/04.html.)


In reply to Re: Filling out PDF forms with data from DBI? by Thelonius
in thread Filling out PDF forms with data from DBI? by merlyn

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.