Welcome Guest, Not a member yet? Register   Sign In
Class not found trying to integrate TCPDF

(This post was last modified: 09-01-2021, 03:43 PM by SoccerGuy3.)

Following the instructions here: https://forum.codeigniter.com/thread-754...#pid377974

I setup TCPDF, but upon running I am getting an error. As best I can tell I followed the instructions exactly (except for a slight name change). What am I missing?

Unzipped the file downloaded from GitHub into App/ThirdParty/TCPDF

Added a file (SBPdf.php) into App/Libraries:
PHP Code:

namespace App\Libraries;


SBPdf extends TCPDF {

Then in my controller I call it:
PHP Code:
public function testpdf()


At that point I was getting an error: 'Class "App\Controllers\Admin\SBPdf" not found'

I then added this to my controller (app/Controllers/Admin/Services.php), which got me closer, I think:
PHP Code:
use App\Libraries\SBPdf

But this produces an error of: 'Class "App\ThirdParty\TCPDF\Tcpdf" not found' error.

Feel like I am missing something obvious as others have said it just works, so... Help!

Messages In This Thread
Class not found trying to integrate TCPDF - by SoccerGuy3 - 09-01-2021, 03:41 PM

Theme © iAndrew 2016 - Forum software by © MyBB