[Solved] Implement Mpdf |
Hello friends!
I'm trying to implement the mpdf library in CodeIgniter 4 like this: Accessing App/Config/Constants.php includes the line of code: Code: defined('MPDF') || define('MPDF', ROOTPATH . 'vendor/autoload.php'); In the App/Config/Autoload.php file, I added one more element to the psr4 array: Code: $psr4 = [ In the App/Libraries file, I created a class to instantiate Mpdf: Code: <?php namespace App\Libraries; In the Controller, I'm calling the Mpdf class like this: Code: use App\Libraries\Mpdf; But the displayed page is corrupted, as seen in the link below. Image corrupt My question is: what is the correct way to implement Mpdf in CodeIgniter 4? Note: I included Mpdf to the project via Codeigniter composer Thanks in advance! |
Messages In This Thread |
[Solved] Implement Mpdf - by PHS - 01-25-2020, 07:21 PM
RE: Implement Mpdf - by jreklund - 01-26-2020, 12:48 AM
RE: Implement Mpdf - by PHS - 01-26-2020, 06:36 AM
RE: [Solved] Implement Mpdf - by jreklund - 01-26-2020, 12:10 PM
|