This project has two routes to completion, and either one will be acceptable.
1) We have a Word document that has form fields in it. We want to be able to insert data on the fly into those Word form fields via PHP. The fields need to be populated with data that can be provided in a variety of ways (PHP variables, PHP array, CVS, etc). The Word document must then be able to be downloaded by the end-user and printed. This must match the same format and styling as if the end-user entered data directly into the Word form document.
2) Re-create the Word document in a format that can have data inserted on-the-fly, and then converted into PDF or DOC. Open-source conversion utilities may be used, as long as they can run on a basic LAMP stack. Again, we can provide the data in any of the basic formats, and the PDF/DOC would need to be downloaded by the end user and printed to the same exact specification and design that they would recieve if they typed the data into the Word form fields.
{new}
We have the code to collect the data, at which point it is put into a MySQL database. It is then retrieved for conversion into a PDF. The trouble we are having is matching the format and style of the converted PDF (with data pulled prior to conversion from the database) to the original Word document. If you could manage to match this style and formatting, that would match our needs perfectly.