Jeckky / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Lithuanian encoding problem #440

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With 6.0 beta3

I'm trying to rended Lithuanian text which won't display correctly . 

My code is:

$html = '
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="lt-LT" xml:lang="lt">
<head>

        </head>
        <body>
            <p>Lithuanian: ąčęšįąųčęūį - ĄČĘĖĮŠŲŪ</p>

        </body>
    <html>

';

$dompdf = new DOMPDF();
$dompdf->load_html($html, 'UTF-8');
$dompdf->render();
$dompdf->stream("sample.pdf");

Original issue reported on code.google.com by w...@promotion.lt on 12 Mar 2012 at 6:19

GoogleCodeExporter commented 9 years ago
Have you read over the documentation here:
http://code.google.com/p/dompdf/wiki/CPDFUnicode

It needs to be updated to reflect some changes in beta 3, but it's still 
relevant. You'll have more success if your HTML takes into account the advice 
from that document. Try this HTML:

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="lt-LT" xml:lang="lt">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <style>
    body { font-family: DejaVu Sans; sans-serif; }
  </style>
</head>
<body>
  <p>Lithuanian: ąčęšįąųčęūį - ĄČĘĖĮŠŲŪ</p>
</body>
<html>

You can see the above HTML rendered here:
http://eclecticgeek.com/dompdf/debug.php?identifier=b6e98aca930bab802515827a75b8
55fb

Original comment by eclecticgeek on 17 Mar 2012 at 2:23

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 30 May 2013 at 5:16