sdglhm / dompdf

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

Symbols (Θ Ο ⊗ ⟩) does not rendered in PDF file #435

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Any html file contains symbols below:
Θ Ο
⊗ ⟩

What is the expected output? What do you see instead?
The symbols shall be generated in the PDF file

What version of dompdf are you using? What version of PHP? On what
operating system?
dompdf-0-6-0-beta 3
PHP 5.1.6
FreeBSD 

Please provide the HTML source code you want to convert, or any additional 
information.
Below is a complete HTML file:

<html>
<body>
<p>
Put your html here, or generate it with your favourite templating system.
</p>
&bull;
&copy;
&euro;
<br>
&Theta; &Omicron;
<br>
&otimes; &rang;
<br>

</body>
</html>

Original issue reported on code.google.com by mr.r...@gmail.com on 27 Feb 2012 at 8:32

GoogleCodeExporter commented 9 years ago
The default character encoding of PDFs produced by dompdf is Windows ANSI. 
Character that do not render as expected with the default encoding are probably 
not supported.

About Windows ANSI:
http://en.wikipedia.org/wiki/Windows-1252

Because of the limitations of the default encoding we generally recommend that 
you always configure dompdf for Unicode compatibility and use a non-core font 
(such as one of the DejaVu fonts).

See the following document for information on how to enable Unicode support:
http://code.google.com/p/dompdf/wiki/CPDFUnicode

See the following for a sample rendering using DejaVu Sans:
http://eclecticgeek.com/dompdf/debug.php?identifier=2bb6d9fcc2ff1dbfe764b2e684aa
1b8a

You could also go the route of using the "Symbol" font, Like Windows ANSI it 
uses a 255 character encoding. However, it's harder to work with since it uses 
a custom character mapping. See:
http://eclecticgeek.com/dompdf/debug.php?identifier=a1cc23e87a90966524c0a9aab23e
7a95

About the Symbol font:
http://en.wikipedia.org/wiki/Symbol_font

Original comment by eclecticgeek on 28 Feb 2012 at 12:35

GoogleCodeExporter commented 9 years ago

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