![]() |
How to call UMUM class in CI4? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: How to call UMUM class in CI4? (/showthread.php?tid=88004) |
How to call UMUM class in CI4? - JayasSarea - 07-05-2023 Hello everyone, I need suggestions for creating a report using FPDF with CI4. Here is my controller: <?php namespace App\Controllers; use App\ThirdParty\FPDF; public function laporan() { $pdf = new UMUM('P','mm','Legal'); $pdf->SetMargins(5, 7, 5); $pdf->SetAutoPageBreak(true, 20); $pdf->AliasNbPages('{pages}'); $pdf->AddPage(); $this->response->setHeader('Content-Type', 'application/pdf'); } The issue I'm facing is how to call the UMUM class in CI4. I had tried it in CI3 and it worked, but in CI4, it doesn't seem to work. RE: How to call UMUM class in CI4? - JustJohnQ - 07-05-2023 My fpdf (version 1.85) folder is in App\ThirdParty. I added the following to autoload.php in config: PHP Code: public $classmap = [ My test method looks like this: PHP Code: public function fpdfTest() A PDF is created and automatically saved/opened (depending on browser settings) |