Dompdf with special characters (UTF-8)

I’m not really into php, but sometime you just have no other option. And you know: If all you have is a hammer, everything looks like a nail.

Recently I have been struggling for few hours how to generate pdf from html, that looks like original page and show proper characters. I my case I had problem to print czech chars like ěščřžýáíé. 

First I found recommendation to use Sans Deja Vu font family, which looks like s*it.

Than I finaly found not outdated howto on official github page. In short:

    1. Download and install Dompdf
    2. Download dompdf-utils (don’t know why its not part of Dompdf anymore ?!) and copy laod_font.php in you dompdf folder
    3. And finally!
php laod_font.php Arial /path/to/arial.ttf

Now you should have you font installed and you can use it in you php script like:

Uff.. Why do I feel like this?
Hmm, php is not my cup of tea.

Related Post

Free Better Battery Stats and Time Remaining for M... Better Battery Stats and Time Remaining for Mac OS TL;DR; Do you miss the time remaining indicator on your MacBook, MacBook Air, or MacBook Pro? He...
Convert HEIC to JPG on Right Click for Free Convert HEIC to JPG on Right-Click In iOS 11 Apple is replacing the JPEG image format with the new HEIC alternative. But what to do when device or p...
MacBook wifi issue – OS X keeps reconnecting Last few weeks I was facing annoying wifi problems. My mac was reconnecting every 5 minutes. On top of that BSSID was reseting so I saw BSSID changing...
Translate Selected Text to English on Right Click ... TL;DR; Need instant translation right in context menu? You can accomplish it for free with one line of code in Automator, or you can proc...
FAQ: Mac OS X Services HEIC to JPG on Right-Click Service Q: Where’d all my services go? I don’t see anything in the Services menu. A: If you don’t select anything before...
PPTP VPN on MAC OS X Sierra, High Sierra and Mojav... PPTP VPN for Mac OS X Introduction PPTP VPN is no longer supported on macOS Sierra and High Sierra and that is just fine, because there are some se...
Buy me a coffeeOut of coffee 😱, please help!