In this tutorial you will learn how to easily convert web pages and raw HTML code to PDF in your PHP applications. We will use the Pdfcrowd API for PDF generation. The API offers these benefits:
The API is easy to use and fully supports HTML/CSS2/JavaScript.
The integration takes only a few minutes.
No third-party libraries are needed, just a single tiny PHP file.
It does not consume CPU/memory on your computer, PDFs are created in the Pdfcrowd servers.
https://pdfcrowd.com/blog/2011/04/18/convert-html-to-pdf-in-php.htmlhttp://www.fpdf.org/