I am using DOMPDF v.0.6.1 downloaded from github to convert HTML to PDF file. I am facing fontdisplay issue with while adding my custom font in configuration. dompdf_font_family_cache.dist.php
I used http://eclecticgeek.com/dompdf/load_font.php to generate Unicode TAMIL font(latha by microsoft font) .I have copied the fonts into respective folders.
But I see the fonts are not printing as it is.
My code:
<p style="font-family: tamil-latha, verdana, sans-serif;" >தமிழ்</p>
But what is printed in PDF is :
Both the values are not Same. There is some box is coming near the font and a dot on last character is missing..
Note: I have also added newly created font into dompdf_font_family_cache.dist.php
'tamil-latha' =>
array (
'normal' => DOMPDF_FONT_DIR . 'latha',
'bold' => DOMPDF_FONT_DIR . 'latha',
'italic' => DOMPDF_FONT_DIR . 'latha',
'bold_italic' => DOMPDF_FONT_DIR . 'latha',
),
I have raised the same question in github here : https://github.com/dompdf/dompdf/issues/838
Suggested Solution was: use dompdf v.0.6.2 But there is no such version available here : https://github.com/dompdf/dompdf Help me if you are able to get v.0.6.2
Dompdf appears to have issues with UTF-8 encoding. I tried your sample with dompdf and I ran into the same issue you did. However, I also tried it with tcpdf (also free) it appears to work well.
Here is the code for your sample, and the full source can be downloaded here.
I tried with tcpdf as suggested by josh. Now the previous word is coming fine but new word is not displayed properly.
Actual Answer in PDF is :