put => charset="utf-8" in a meta tag inside head section of your blade file
MPDF with Laravel Vapor problem
Hello,
I am working on a Laravel 7 project, hosted with Laravel Vapor.
I'm trying to use the MPDF library to convert HTML to PDF.
The problem is, no matter what is the HTML content, i am getting a 'Internal server error' from Vapor.
I have tried with the most basic example from the MPDF documentation:
$mpdf = new Mpdf();
// Write some HTML code: $mpdf->WriteHTML('Hello World');
// Output a PDF file directly to the browser $mpdf->Output();
and it's still throwing an error.
Here is the error output from Vapor:
Fatal error: Uncaught Exception: Error encoding runtime JSON response: Malformed UTF-8 characters, possibly incorrectly encoded in /tmp/vendor/laravel/vapor-core/src/Runtime/NotifiesLambda.php:49 10:41:37 PM
Thanks!
Please or to participate in this conversation.