ERROR with this combination : mPDF on Yii 1.1.29 + php 7.4

Hi I’m trying to migrate my yii app to Php 7.4,
In the process I found that mPDF need to be upgraded.
So I get into “protected” folder, and run “composer intall mpdf/mpdf”, this create a composer.json file and the vendor folder, with the mpdf lib in there.
then i downloaded this extension " yii-pdf" … and tweak the value in ‘librarySourcePath’ => ‘application.vendor.mpdf.mpdf.src.*’,

And I have this Error:

error exception.ReflectionException
ReflectionException: Class \Mpdf\Mpdf does not exist in
C:\laragon\www\sga_ceia\protected\extensions\yii-pdf\EYiiPdf.php:82
Stack trace:
#0 C:\laragon\www\sga_ceia\protected\extensions\yii-pdf\EYiiPdf.php(82):
ReflectionClass->__construct(‘\Mpdf\Mpdf’)
#1 C:\laragon\www\sga_ceia\protected\extensions\yii-pdf\EYiiPdf.php(105):
EYiiPdf->initLibrary(‘mpdf’, Array)

Can I use mPDF without yiiPdf ??
How I use the autoloader in that case?

is any other solution??

Best Regards

I solved using this

// Require composer autoload
require Yii::getPathOfAlias('application.vendor').DIRECTORY_SEPARATOR.'autoload.php';
// Create an instance of the class:
$mpdf = new \Mpdf\Mpdf();

I don’t know if there is other way.

I think this mean, I’m not using yiiPdf…