Open progintYasin opened 2 years ago
Hi someone found a solution that works for me
https://serveanswer.com/questions/that-how-to-fix-laravel-pdf-logerror
Can not oversee the consequences but it works Cheers,
Eric
Hi someone found a solution that works for me
https://serveanswer.com/questions/that-how-to-fix-laravel-pdf-logerror
Can not oversee the consequences but it works Cheers,
Eric
This solution did not work
Sorry for you. For me it works like a charm. Did you clear your cache and terminate horizon (if used).
Cheers,
Eric
Hi someone found a solution that works for me
https://serveanswer.com/questions/that-how-to-fix-laravel-pdf-logerror
Can not oversee the consequences but it works Cheers,
Eric
Thanks a Lot. It worked for me.
Downgrade psr/log to 2.0 instead of 3.0. Because Mpdf (https://packagist.org/packages/mpdf/mpdf) does not support psr/log 3.0
The serveranswer link did not work me but a cached page was available. For anyone wondering the solution on the page was
composer remove niklasravnsborg/laravel-pdf
composer remove mpdf/mpdf
composer remove psr/log
composer require psr/log=v2.*
composer require mpdf/mpdf v8.0.17
composer require niklasravnsborg/laravel-pdf
Fixed the issue for me.
Eric @chris-gassner Hi Chris,
Great, you found a cache. I needed the solution for another project and couldn't find the code anymore. You helped met out! Thanks a lot. Also learned a lesson. Copy the solution, not only the link. 😀 Cheers,
Eric
Hi someone found a solution that works for me
https://serveanswer.com/questions/that-how-to-fix-laravel-pdf-logerror
Can not oversee the consequences but it works Cheers,
Eric
This link is not active anymore, how can I find the solution
as above composer remove niklasravnsborg/laravel-pdf composer remove mpdf/mpdf composer remove psr/log composer require psr/log=v2.* composer require mpdf/mpdf v8.0.17 composer require niklasravnsborg/laravel-pdf
as above composer remove niklasravnsborg/laravel-pdf composer remove mpdf/mpdf composer remove psr/log composer require psr/log=v2.* composer require mpdf/mpdf v8.0.17 composer require niklasravnsborg/laravel-pdf
Thank you it works like a charm, only thing I had to adjust is the composer require psr/log=v2.*
to composer require psr/log:^2.0
i use this package in laravel 8.x and dont have any problem
but in laravel 9 i have this error when i want download pdf file with LoadView method
Declaration of Mpdf\Mpdf::setLogger(Psr\Log\LoggerInterface $logger) must be compatible with Psr\Log\LoggerAwareInterface::setLogger(Psr\Log\LoggerInterface $logger): void