Hello everyone, in this post, i will share how to fix recent PDF error in your laravel 5,6,7,8, & 9 project.
If you face this error, you should follow below instructions.
Delete composer.json file from project. After deleting composer.json file, you need to install latest pdf package
Install the latest version of mPDF. Run below command-
composer require mpdf/mpdf
After running this command, you need to update composer.
If your Laravel project below 5.5, you need to manually add provider and aliases:
'providers' => [ Mccarlosen\LaravelMpdf\LaravelMpdfServiceProvider::class, ], . . . . 'aliases'=>[ 'PDF' => Mccarlosen\LaravelMpdf\Facades\LaravelMpdf::class, ],
I hope, you will fixed your issue if you followed this instructions.
Thank you for your time.