Category : mpdf

I want to generate multiple files using mpdf library, but unfortunately, only one file is generated, instead of multiple, how can I do this. Thanks for showing your interest. for ($i=1; $i<count($sheetData); $i++) { $name = $sheetData[$i][0]; $fName = $sheetData[$i][1]; $mpdf = new MpdfMpdf([‘mode’ => ‘utf-8’, ‘format’ => [290, 236]]); $stylesheet = file_get_contents(‘../assets/css/style.css’); $mpdf->WriteHTML($stylesheet, MpdfHTMLParserMode::HEADER_CSS); ..

Read more

I am using the mpdf library for generating the pdf, how can I generate multiple pdf using this library. for ($i=1; $i<count($sheetData); $i++) { $mpdf = new MpdfMpdf([‘mode’ => ‘utf-8’, ‘format’ => [290, 236]]); $stylesheet = file_get_contents(‘../assets/css/style.css’); $mpdf->WriteHTML($stylesheet, MpdfHTMLParserMode::HEADER_CSS); ob_end_clean(); $mpdf->WriteHTML(‘<p>Hello World</p>’) $filename = time().’.pdf’; $mpdf->Output($filename ,’D’); } Sourc..

Read more

Local Environment: PHP: v8.0.2 Framework: Laravel v8.* mPDF Version: v8.0.10 Deploying With: Laravel Deployer / PHP deployer (deployer) Operating System and Version: macOs Cataline 10.15.5 & Laravel Valet Production Environment: PHP: v8.0.2 Framework: Laravel v8.* mPDF Version: v8.0.10 Product version: Plesk Obsidian 18.0.32. OS version: CentOS 7.9.2009 x86_64 Description It works very well in the ..

Read more