Welcome Guest, Not a member yet? Register   Sign In
Use of FPDF library in CI4
#1

Hello guys,
As I need fpdf in my project, I have installed it thru seatsign/fpdf found in packagist.org, using :

composer require setasign/fpdf:^1.8

It is now present in the vendor\setasign\fpdf directory of my app

To get it in my project, I have put a file MyFpdfClass.php in \APP\Libraries containing :
<?php
namespace App\Libraries;
use \setasign\fpdf\fpdf;
[...]
class MyFpdfClass extends Fpdf
{

but the call in controller $t = new MyFpdfClass() send an error :

Class "setasign\fpdf\fpdf" not found
APPPATH/Libraries/MyFpdfClass.php at line 13

How can I set the "use" so that the library is found ?
Is it a problem with autoloader not correctly set ?

Thanks for your help
Eric
Reply


Messages In This Thread
Use of FPDF library in CI4 - by foxbille - 10-10-2022, 01:46 AM
RE: Use of FPDF library in CI4 - by ozornick - 10-10-2022, 01:59 AM
RE: Use of FPDF library in CI4 - by foxbille - 10-10-2022, 08:49 AM
RE: Use of FPDF library in CI4 - by abatrans - 10-11-2022, 07:25 AM
RE: Use of FPDF library in CI4 - by DunogRamers - 11-04-2022, 11:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB