印地语语言在tcpdf上无法正确显示

suh*_*dit 14 php utf-8 tcpdf hindi

我创建了下面的代码,用于在tcpdf中使用arial unicode字体显示hindi文本

$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');
Run Code Online (Sandbox Code Playgroud)

但它没有正确显示

但在PHP中它显示正确的文本.

请告诉我是否有任何错误.

Amr*_*Amr 2

尝试使用mPDF作为替代方案。它非常好并且易​​于使用。这是如何显示印地语的示例