Use any of these 4 libraries below to easily covert your HTML to PDF files with PHP.
I’ve always used TCPDF for converting HTML, including JPEG and SVG images into PDF files, which you can download inline in the browser, save on the server or force a “save as” dialog.
- Free PDF – http://www.fpdf.org/
- TCPDF – http://www.tcpdf.org/
- MPDF – http://www.mpdf1.com/
- dompdf – https://github.com/dompdf/dompdf