Now I'm doing a task about exporting data into PDF from CodeIgniter framework. I'm using FPDF http://www.fpdf.org/ for exporting the PDF. And here is my controller:
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');
}
But the result like this:
How do I can display a Japanese word in that .pdf file?