印地语在tcpdf上无法正确显示 [英] Hindi language not displaying correctly on tcpdf
本文介绍了印地语在tcpdf上无法正确显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了以下代码,用于在tcpdf中使用arial unicode字体显示印地文文本
i have created below code for displaying hindi text using arial unicode font in tcpdf
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
$pdf->addTTFfont('fonts/ARIALUNI.TTF', 'TrueTypeUnicode', '', 32);
$pdf->SetFont('arialuni', '', 10,'false');
$txt = 'hindi text with arial unicode समृध्दि';
$pdf->Write(0, $txt, '', 0, 'L', true, 0, false, false, 0);
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_038.pdf', 'I');
但显示不正确
但是在php中,它显示正确的文本.
But in php it showing correct text.
请告诉我是否有什么问题.
Please tell me if there is anything wrong.
推荐答案
我会尝试 mpdf1.com 我以前曾尝试过,但它与印地文一起使用
I would try mpdf1.com I have tried it before, and it worked with hindi
这篇关于印地语在tcpdf上无法正确显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文