带有特殊字符的 dompdf

Ľub*_*boš 5 special-characters dompdf laravel-5

我有以下代码:

\n\n
$pdf = \\App::make(\'dompdf\');\n$pdf->loadView(\'offers.pdf\',compact(\'email\',\'messages\'));\nreturn $pdf->stream();\n
Run Code Online (Sandbox Code Playgroud)\n\n

pdf.blade.php:

\n\n
<!doctype html>\n<html class="no-js" lang="sk">\n<head>\n    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n    <title></title>\n    <style type="text/css">\n        * {\n            font-family: "Arial";\n        }\n    </style>\n</head>\n<body>\nRozpo\xc4\x8det, Volite\xc4\xben\xc3\xa9 \xc4\x8dasti\n</body>\n</html>\n
Run Code Online (Sandbox Code Playgroud)\n\n

PDF 文档如下所示:

\n\n
Rozpo?et,Volite?n\xc3\xa9 ?asti\n
Run Code Online (Sandbox Code Playgroud)\n\n

但我需要显示文件中的特殊字符pdf.blade.php,你有什么解决方案吗?

\n

and*_*112 0

这对我有用:

\n
<html>\n\n<head>\n  <meta http-equiv="Content-Type" content="charset=utf-8" />\n  <style type="text/css">\n    * {\n      font-family: "DejaVu Sans Mono", monospace;\n    }\n  </style>\n</head>\n\n<body>your content \xc4\x87\xc4\x8d\xc5\xbe\xc5\xa1\xc4\x91...</body>\n\n</html>\n
Run Code Online (Sandbox Code Playgroud)\n