New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOMPDF not rendering unicode fonts character as it is #838
Comments
First, if you're not using v0.6.1 you should go ahead and upgrade. Then use the built-in font loading tools. You can still use the web-based font prep tool, but what's included with dompdf is much better right now. Third, try disabling font subsetting to see if that helps. I was able to use the font without any missing glyphs with the following HTML: <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style>
@font-face {
font-family: latha;
font-style: normal;
font-weight: 400;
src: url(http://eclecticgeek.com/dompdf/fonts/latha.ttf) format('true-type');
}
</style>
</head>
<body>
<p style="font-family: latha, DejaVu Sans, sans-serif;">தமிழ்</p>
</body>
</html> |
Thanks. I am using v0.6.1 . can i have the download link please ? |
Tried as you suggested in 3rd option but no luck. Here is my complete code used. require_once($unsecured_param['home_dir']."/APIs/dompdf-0.6.1/dompdf_config.inc.php");
$cart_body='<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style>
@font-face {
font-family: latha;
font-style: normal;
font-weight: 400;
src: url(http://eclecticgeek.com/dompdf/fonts/latha.ttf) format(\'true-type\');
}
</style>
</head>
<body>
<p style="font-family: latha">தமிழ்</p>
</body>
</html>';
$dompdf = new DOMPDF();
$dompdf->load_html($cart_body);//body -> html content which needs to be converted as pdf..
$dompdf->render();
$output = $dompdf->output();
$user_bill_pdf = 'User_Bill_tamil.pdf';
file_put_contents($user_bill_pdf, $output);//to save pdf into a location
echo "<br>PDF generated.."; |
Sorry. I meant 0.6.1, .2 is in-the-works. Do you have read/write access to your temp directory? Is DOMPDF_ENABLE_REMOTE true? Those are the only two things I can think that may affect your output (though I don't know that the latter is necessary). Do you get any PHP errors/notices? |
do you mean /tmp folder ? yes i have. |
Could you please simulate this in your directory and give the working sample code ? |
I had no trouble using your HTML. I don't really see anything wrong with the code so the issue might be somewhere else. Are there any red flags on the setup page (browse to dompdf-0.6.1/www/setup.php)? |
@bsweeney Hi, can you help me debug this? http://eclecticgeek.com/dompdf/debug.php?identifier=45261abdcca702deb6c11cd11dd6c2df |
@moeseth you should start a new discussion on the support forum to work through any problems you're having. Unless you can definitively identify a problem with the solution for a closed issue that is. That being said, the format specifier in your |
how to show the Urdu alphabet in my PDF file and how to add the Urdu alphabet Unicode . |
test.php
|
@palistha01 you should start a new issue rather than comment on a closed one. Also, please indicate which version of Dompdf you are using. |
i am searching same solution. |
I used http://eclecticgeek.com/dompdf/load_font.php to generate Unicode TAMIL language 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:
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..
Font Link : http://font.downloadatoz.com/font,6907,latha.html
Note: I have also added newly created font into dompdf_font_family_cache.dist.php
Kindly suggest me how should i get the Unicode fonts as similar to original fonts.
The text was updated successfully, but these errors were encountered: