CodeIgniter Forums
CI4 PDF Customized - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Addins (https://forum.codeigniter.com/forumdisplay.php?fid=34)
+--- Thread: CI4 PDF Customized (/showthread.php?tid=75463)

Pages: 1 2 3


RE: CI4 PDF Customized - pippuccio76 - 01-11-2022

(04-30-2020, 04:31 PM)jreklund Wrote: This should do the trick.

Code:
composer require tecnickcom/tcpdf

Code:
composer install

PHP Code:
<?php namespace App\Controllers;

use 
TCPDF;

class 
Home extends BaseController
{
 public function 
index()
 {
 
$pdf = new TCPDF(PDF_PAGE_ORIENTATIONPDF_UNITPDF_PAGE_FORMATtrue'UTF-8'false);
 }

I use composer to install TCPDF in locale , uploaded the folder tecnickom in vendor folder on server . Uploaded the compser.json fileĀ  .In controllerĀ  ; use TCPDF;

but have this error : Class 'TCPDF' not found


RE: CI4 PDF Customized - kenjis - 09-28-2023

exit() stops the normal operation of the framework.
Do not use exit().