I am developing a website in Cakephp framework, what i want to do, is to give the user option of downloading the page he is viewing in pdf format.I am using html2pdf plugin but its giving problem integrating with Cakephp. How can i solve this. Thanx for your interest.
Try TCPDF. It is simple and powerful enough.
Using DOMPDF .
Example Code :
<?php
require_once("dompdf/dompdf_config.inc.php");
$html = "<h1>some document</h1>";
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->set_paper('A4');
$dompdf->render();
$dompdf->stream("pdfReport.pdf");
?>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.