Yogesh k
Yogesh k

Reputation: 352

How to generate pdf file from dynamic data coming from mysql database in php?

I am doing one web application society management system. In this application I want to generate pdf file for each user separately. Means during invoice generation , if there are 10 users then for each user separate invoice should get generated as a pdf after clicking on generate PDF button. My invoice got generated for each user but now I dont understand how to convert it into pdf dynamically. So please help me in this question ?

Upvotes: 2

Views: 43061

Answers (2)

Alex Hernández
Alex Hernández

Reputation: 147

You probably have to check out this lib: mPDF

It's quite easy to use and allows you to generate PDF from HTML templates.

Upvotes: 4

user3364940
user3364940

Reputation: 144

Use any of the following php scripts to generate dynamic PDF documents

fpdf: http://www.fpdf.org/

tcpdf: http://www.tcpdf.org/

Upvotes: 5

Related Questions