Laravel Project: 7.6.1
DomPdf: 0.8.7
I've created a function to generate a pdf from a html file. This function is loaded at the click of a button.
First time, I put my css directly in my html page and there was no problem. But now, I would like to put it in an external file.
Now, when I click on the button, I've the error:
iconv(): Wrong charset, conversion from `utf-8' to `us-ascii//TRANSLIT' is not allowed
Head of my Html
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Laravel PDF</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<link href="./css/app.css" rel="stylesheet">
<script src="./js/chart/report.js" ></script>
<style>
@page { margin: 100px 25px; }
</style>
</head>
My controller
$pdf = PDF::loadView('report.pdf.index-pdf', compact('datas'));
$pdf->setPaper('A4', 'p');
return $pdf->download('report.pdf');
Somebody to help me?