TestCreated with Highcharts 7.0.3Participant wise expense ratio33.3%33.3%33.3%33.3%33.3%33.3%AjitImransunny'; //echo $html;exit; require("../../lib/mpdf60/mpdf.php"); //$html = $this->request->data['whole_content']; // pr($html); die; $mpdf = new mPDF(); $mpdf->SetProtection(array("print")); $stylesheet = file_get_contents(CDN_URL.'css/print_report.css'); $mpdf->WriteHTML($stylesheet,1); $mpdf->WriteHTML($html, 2); $rand = rand(1000, 10000); $reportUrl = "reports/"; if(!is_dir($reportUrl)){ mkdir($reportUrl,0777,true); } $filename = $reportUrl.$rand."_".time()."_"."expenses.pdf"; // echo $html; die; $mpdf->Output($filename); if (file_exists($filename)) { header('Content-type: application/pdf'); header('Content-Disposition: attachment; filename='.$filename); readfile($filename); @unlink($filename); exit; } ?>