how to add css file in mpdf

megalocker

New Member
i am trying to convert html into pdf using mpdf. problem is that i am unable to apply css to pdf file.. here is my code of php\[code\] <?php$html = $divPrint;$mpdf=new mPDF();$stylesheet = file_get_contents('pdf.css');$mpdf->WriteHTML($stylesheet,1);$mpdf->WriteHTML($html,2);$mpdf->Output();exit;?>\[/code\]what it is doing is taking html through ajax on my this php page . but the output it gives doesn't come with css which i've written for it.. please tell me that to do now?
 
Back
Top