使用PHP或XML将MySQL数据导出为PDF表单

问题描述:

i have a problem on a project I'm working on. I have to create an HTML Form that inserts data in MySQL and then prints the data on an existing PDF Form Template in pre-defined fields. My Problem comes in with the PDF. I've created my form and it inserts the data into MySQL now i need to get that data into the PDF Form. I have looked at FPDF adn Numerous others non of them do what i want.

我正在处理的项目有问题。 我必须创建一个HTML表单,在MySQL中插入数据,然后在预定义字段中的现有PDF表单模板上打印数据。 我的问题来自PDF。 我已经创建了我的表单并将数据插入MySQL,现在我需要将这些数据导入PDF表单。 我看过FPDF和许多其他人没有他们做我想要的。 p> div>

You an create PDF with active fields in it. Such PDFs can be opened in Reader and we can insert data in text fields. Those can be generated by PDF create tools(Google it). So after creating this tyoe of PDF form you can use an application PDFTK to fill those PDF form with values we post in a form. After filling those data we can crete a normal un-editable copy of pdf to download

You can use any PDF creation tool (FPDF, Zend, TCPDF) to create the form using XY, or first convert the template to PHP and generate it on the fly.

Just query the DB for the proper fields and positions.