Display chinese characters

Display chinese characters

Postby shaunteh » Sun Jun 25, 2017 3:29 pm

I have an inquiry on how to display chinese character using Nubuilder. I try to insert chinese.php into fpdf file, and when I run the example, chinese character can be displayed in PDF. But what should I do to display chinese character in Nubuilder report? Tq very much.

Below is the code for your reference(from fpdf.org).
If you want Big5 support, call this line in your script:

$pdf->AddBig5Font();

Then you can select the font like this:

$pdf->SetFont('Big5','',20);

All styles (bold, italic and underline) are available.

For GB:

$pdf->AddGBFont();
$pdf->SetFont('GB','',20);

All usual methods (Cell(), MultiCell(), Write() and GetStringWidth()) work with these new fonts.

Ex.php

require ('chinese.php');

$pdf=new PDF_Chinese();
$pdf->AddBig5Font();
$pdf->AddPage();
$pdf->SetFont('Big5','',20);
$pdf->Write(10,'zxc123你好');
$pdf->Output();
shaunteh
 
Posts: 2
Joined: Thu Jun 01, 2017 11:40 am

Re: Display chinese characters

Postby shaunteh » Mon Jun 26, 2017 7:02 pm

Problem fixed.
shaunteh
 
Posts: 2
Joined: Thu Jun 01, 2017 11:40 am


Return to Report Writer