Question: To generate pdf from html page I have tried many pdf libraries like **FPDF,HTML2FPDF,CEZPDF,DOMPDF and MPDF** .

But in every pdf library I found some issues which don't produce required layout of the page.

For example in MPDF I found page breaks but it was a nice html to pdf converter.

So kindly suggest me which library should I use to generate pdf? I don't care if it needs to purchase.

Thanks in advance.

Answer: 
I've used TCPDF and DOMPDF.

**FOR:**

* TCPDF:
	+ You can design the page layout very easily
* DOMPDF:
	+ almost every css feature support, if you design the page in html, css, the printed pdf will be the same. This is the easiest library available on the internet.
	+ you also can use php scripts, and DOMPDF will run it on pdf generation.

**Against:**

* TCPDF:
	+ you have to write a lot...
	+ very hard to use css
* DOMPDF:
	+ on large tables, it has a huge memory consumption, and could crash.
	+ tricky page layout design ( header and footer)
Use this tool. This will be better

<http://sourceforge.net/projects/html2fpdf/>