If you want to do this on a server, you cannot use Adobe Acrobat (for legal and technical reasons). To get a quick solution going, take a look at pdftk (http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/). This allows you to pass in a PDF file and a FDF file and fill the form fields and flatten the document.
Adobe has the FDFToolkit, that allows you to merge and flatten, but as far as I know, the version available is pretty old, and you may have a hard time getting it to run on a modern system (last time I tried, I gave up):
http://www.adobe.com/devnet/acrobat/fdftoolkit.html
Karl Heinz Kremer
PDF Acrobatics Without a Net
PDF Software Development, Training and More...
http://www.khkonsulting.com