vikrambalye / dompdf

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

Special Characters still fun to work with in dompdf? #240

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Here's what I've tried in my code:

<?php
require_once("../dompdf_config.inc.php");
$html = '&#8364;';  // a fun special character
$dompdf = new DOMPDF(); 
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("contract.pdf");
exit(0);
?>

Simply, I'm getting a question mark for the character above, or any characters 
like the Euro (&#8364;).
I'm running this on Centos (whatever latest version exists today), and I'm 
using the dompdf version: 0.5.2

Any luck with this part of the project?  

Original issue reported on code.google.com by netfru...@gmail.com on 27 Feb 2011 at 9:46

GoogleCodeExporter commented 9 years ago
Anything prior to 0.6.x has limited support for characters outside iso-8859-1 
encoding. The Euro is supported in 0.5.x (see the FAQ 
<http://code.google.com/p/dompdf/wiki/FAQ>), but otherwise you have to jump 
through some PDF encoding hoops.

The 0.6.0 release will have better support for "special" characters by default. 
The default encoding is based on Windows ANSI (one of the few recognized by the 
PDF 1.3 spec). You can enable better character support by loading a 
Unicode-based font and enabling Unicode.

Original comment by eclecticgeek on 28 Feb 2011 at 8:11

GoogleCodeExporter commented 9 years ago

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