A document is not produced on the server end. The web is stateless in nature, meaning data and requests only exist as long as it takes to send a response back to whoever requested it, and it dies. If you set up a form, you can do something like create a document on the server, but normally it will just be loaded into a database or sent via e-mail to an e-mail address. However, it doesn’t just happen. Your data is sent to a location, like a script on a server, an action is performed on it, like writing it to a database or e-mailing it, and it dies.
There are plenty of PHP, Perl, Python, and ASP scripts out there that can do these things, so don’t reinvent the wheel. If you’re just looking for something simple and you aren’t interested in learning how to write server side programs, you can stick with something like Wufoo as mentioned above, which will allow you to embed your form into a page using an iframe.