Background

Here is my situation: I need to create forms that integrate with PDFs. Namely having some means of converting the submitted data. I haven't decided how to do this as yet. What I would like to know is if anyone has worked with forms + PDFs in Drupal 5.

Here is the workflow I would like to create. The site will have PDF forms as downloads and I would like to have an option for users to submit their information using a HTML form as well. The submitted information should be available as CSV and PDF for site admins. A notification emails should also be sent when a form is submitted. The forms will be mostly loan applications.

I would also like to provide a link to a PDF with the submitted data. This PDF should closely resemble the one they would have downloaded and printed. The download should be a one time thing, if possible, since some of the information may be sensitive. I'm more than willing to limited PDF downloads to the admins.

Prior Art

Most of this can be done with existing modules (webforms, surveys) but my problem lies in the the PDF generation. I'll be doing a number of forms so I really want to cut down on the amount of code I will need to write. And especially avoid writing the same form handling code repeatedly. I've been looking at the modules page (the length of the page is ridiculous) to see if there exists a combination of modules that do what I want. I've come up on a few:

FormCorral

FormCorral is new and I've never used it but it seems to overlap with web forms. You create the forms using code instead of in the CMS which might be more flexible. The the newness of the module may be a problem though since it may not be well tested.

Survey

From experience I don't think survey will be the solution.

Web form

The last time I used Web form was the 4.7 version and it was for a very simple form. From looking through the code it seems like it may be a partial solution. The only thing it doesn't handle is the generation of the PDFs. It also offers options for theming of email messages and generated form and also allows you to provide extra validation via PHP. Looking through the issue queue for web form is not encouraging though. There seems to be some show stoppers. It seems to be one of those modules that have 80% right but is still struggling with the 20%. Plus it doesn't seem that active (I could be mistaken).

Initial Thoughts

So here is what I've come up with after a few hours of investigation. I could use Web form and develop a separate module for the PDF generation. I haven't investigated how I'm going to handle this yet. I've looked at PDF View and may use some of the code from it. I would love to provide theme functions for the PDFs that will allow me to reuse code but still provide flexibility in the look of the generated PDF.

Of course I could go ahead and just create all the forms individually but I'm looking for an modular solution that re-uses as much existing code as possible. The idea is that if I need to add a new application form I should only need to define the form (CMS or code) and all the additional functionality comes for free.

I haven't done a lot of Form API development, other than some form_alters here and there so I'd need to get up to speed with that.

The Question

So I guess the question is: Have anyone done anything similar to this and if so any pointers before I start down a path that will cause nothing but headache?

I really don't want to start something that I'll end up scrapping eventually. The 'write everything' option seems mighty attractive in this case but time is an issue.

Thanks.