Take the 2-minute tour ×

I've been struggling with this for some time now.

So I have a simple file called index.php encoded in UTF-8. The content of this file is:


$html =
  '<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><style> body { font-family: verdana; } </style></head><body>'.
  'templating system.</p><p>Č Š Ž č š ž €</p>'.

$dompdf = new DOMPDF();

Basically I'm trying to show the letters Č Š Ž correctly in PDF. Š and Ž work fine but I can't seem to get Č to show up properly, instead I see ? in my PDF file. Any ideas?

share|improve this question
try a different font, you can specify fonts in dompdf –  Dagon Sep 20 '12 at 3:08
I tried all the fonts that are available, I'm also 100% sure that Verdana supports Č. –  Erik Kralj Sep 20 '12 at 3:09
@Erik see Fabien's response. Verdana does support the character, but if the font isn't loaded into dompdf it won't be able to use it. Without a supporting font you'll get the results you noted. –  BrianS Sep 20 '12 at 14:54
add comment

1 Answer

The guide to enable Unicode in DOMPDF may help you. If you are using the latest version (0.6beta or trunk), there is also a new font installer in dompdf/www/fonts.php via your web browser, at the bottom. Also, be sure to check dompdf/www/setup.php.

share|improve this answer
Also, with 0.6.0 beta 3 you can skip loading a font and try one of the DejaVu fonts instead (e.g. try DejaVu Sans). –  BrianS Sep 20 '12 at 14:55
add comment

Your Answer


