Laravel 5 具有特殊字符的dompdf
我有以下代码:Laravel 5 具有特殊字符的dompdf,laravel-5,special-characters,dompdf,Laravel 5,Special Characters,Dompdf,我有以下代码: $pdf = \App::make('dompdf'); $pdf->loadView('offers.pdf',compact('email','messages')); return $pdf->stream(); pdf.blade.php: <!doctype html> <html class="no-js" lang="sk"> <head> <meta http-equiv="Content-Type"
$pdf = \App::make('dompdf');
$pdf->loadView('offers.pdf',compact('email','messages'));
return $pdf->stream();
pdf.blade.php
:
<!doctype html>
<html class="no-js" lang="sk">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
* {
font-family: "Arial";
}
</style>
</head>
<body>
Rozpočet, Voliteľné časti
</body>
</html>
但是我需要在
pdf.blade.php
文件中显示特殊字符,您有什么解决方案吗?默认情况下,您可以访问的唯一字体可能是核心pdf字体(仅支持WIndows ANSI编码)和DejaVu字体(用于dompdf 0.6.0或更高版本中的Unicode支持)。任何其他字体都必须加载到dompdf或通过CSS引用。我在这里的回答可能会有所帮助:
Rozpo?et,Volite?né ?asti