0 Answers

HTML to PDF with PHP

Asked by: 519 views wordoress

his solution uses HTML2PDF project (sourceforge.net/projects/html2fpdf/). It simply gets a HTML text and generates a PDF file. This project is based upon FPDF script (www.fpdf.org), which is pure PHP, not using the PDFlib or other third party library. Download HTML2PDF, add it to your projects and you can start coding.

Code example

require(“html2fpdf.php”); $htmlFile = “http://www.dancrintea.ro”; $buffer = file_get_contents($htmlFile); $pdf = new HTML2FPDF(‘P’, ‘mm’, ‘Letter’); $pdf->AddPage(); $pdf->WriteHTML($buffer); $pdf->Output(‘test.pdf’, ‘F’);

 

Answer Question

WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera

Page optimized by WP Minify WordPress Plugin