1

I am using HTML2PDF to generate a PDF file. I used this for multilingual English and Japanese and used the following font:

$html2pdf->setDefaultFont('arialunicid0');

It works for me. I can download PDF in English as well with Japanese text.

But when I pass Japanese text for the download file name it downloads with blank name and if I pass English character for filename, it works fine.

Please help me to know how to pass a Japanese filename.

Follwing is the code
<?php

$content = ob_get_clean();
//$content = utf8_encode($content);
// convert to PDF
require_once('Classes/library/html2pdf.class.php');
try {
//$html2pdf = new HTML2PDF('P', 'A4', 'en');
$html2pdf = new HTML2PDF('P', 'A4', 'en', true, 'UTF-8');
$html2pdf->setDefaultFont('arialunicid0'); //add this line
$html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$filename = $filename .'_'.date('Ymd');
$html2pdf->Output('注意.pdf','D');//,'D'
}
catch(HTML2PDF_exception $e) {
echo $e;
exit;
}

Please assist me to resolve this.