What you want to do really screams for a templating engine,
as the only thing that changes per document is the data
from the web form.

Personally, I wouldn't create the images with GD but create PDFs
from LaTeX, as LaTeX gives a lot of flexibility and a nice
layout. The sooner you go away from overlaying text
onto a pretty picture, the easier it will be.

The only problem is, of course, if the pretty background picture
is something you cannot change/influence. Then, TeX is out of the window,
as you'd then have to describe the fields as locations to TeX,
which is no more fun than describing them to GD.

Have a look at TT2, which is, AFAIK, a general templating system
(opposed to a templating system geared for HTML) and what TeX
output you can get from there. The rest, spawning off
LaTeX to create a temporary PDF and redirecting the
user to that PDF file is then fairly simple.

Yes, of course I want a templating engine :) And I'd love to use LaTeX to produce PDFs. I have a fairly extensive LaTeX experience. And there's a gotcha:
LaTeX isn't really that good on documents where you want some absolute positioning. It is not much easier to convert an invoice form from a pretty looking Excel sheet to a LaTeX source than to a series of GD primitives. What LaTeX would make easy are justified paragraphs, anti-aliased text and the like. But, e.g., LaTeX tables are pretty awkward and there's usually a good amount of hassle in trying to convert a big Excel table to a LaTeX table.