FPDF无法显示日语单词

时间:2018-12-07 05:37:33

标签: php codeigniter pdf fpdf

我现在正在执行有关从CodeIgniter框架将数据导出到PDF的任务。即时通讯使用FPDF http://www.fpdf.org/导出PDF。这是我的控制器

public function exportPDF()
{
    $pdf = new FPDF('l','mm','A4');
    // create new page
    $pdf->AddPage();
    // setting font type
    $pdf->SetFont('Arial','B',8);

    $pdf->Cell(40,6,'オーダー番号',1,0);
    $pdf->Cell(35,6,'デリバリー日',1,0);
    $pdf->Cell(30,6,'カスタマー名',1,0);
    $pdf->Cell(60,6,'住所',1,0); 
    $pdf->Cell(12,6,'数量',1,1);

    $pdf->SetFont('Arial','',8);

    //fetch data
    $res['data'] = $this->session->userdata('logistic_account');
    $data['orderlist'] = $this->Bll_products->exportPDF($res['data']['logistic_id']);

    foreach ($data['orderlist'] as $row) {
        $pdf->Cell(40,6,$row->order_number,1,0);
        $pdf->Cell(35,6,$row->delivery_date,1,0);
        $pdf->Cell(30,6,$row->name,1,0);
        $pdf->Cell(60,6,$row->address,1,0); 
        $pdf->Cell(12,6,$row->order_quantity,1,1);
    }

    $filename = $res['data']['pic_name']."_".date("Y-m-d H:i:s").'.pdf';
    $pdf->Output($filename, 'D');

}

但是结果是这样

enter image description here

如何在该.pdf文件中显示日语单词。

0 个答案:

没有答案