dompdf有特殊字符

时间:2015-06-04 20:25:19

标签: laravel-5 special-characters dompdf

我有以下代码:

$(document).ready(function () {
    $('.nr1 li').slice(2, 5).css('background', 'red');
    $('.nr2 li:gt(1):lt(3)').css('background', 'blue');
    //$('ul:gt(1)').find('li:gt(2)').css('background', 'purple');

    $('ul').slice(2, 4).find('li:lt(2)').css('background', 'yellow'); // .nr3 and .nr4 has a yellow background
    $('ul').slice(2, 4).find('li').slice(4, 6).css('background', 'green'); // .nr3 has green background but .nr4 does not
});

$pdf = \App::make('dompdf'); $pdf->loadView('offers.pdf',compact('email','messages')); return $pdf->stream();

pdf.blade.php

PDF文档如下:

<!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>

但是我需要在Rozpo?et,Volite?né ?asti 文件中显示特殊字符,你有什么解决方案吗?

0 个答案:

没有答案