<?php require 'chinese.php'; $pdf = new PDF_Chinese(); $pdf->AddBig5Font(); $pdf->AddPage(); $pdf->SetFont('Big5', '', 20); $pdf->Write(10, '▓{о╔оЁ╖┼ 18 C └ул╫ 83 %'); $pdf->Output();
<?php require 'chinese.php'; $pdf = new PDF_Chinese(); $pdf->AddBig5Font(); $pdf->Open(); $pdf->AddPage(); $pdf->SetFont('GB', '', 20); $pdf->Write(10, '中华人民共和国'); $pdf->Output();
function Write($h, $txt, $link = '') { if ($this->isUnicode) { $txt = mb_convert_encoding($txt, FPDF_UNICODE_ENCODING, $this->charset); $oEnc = mb_internal_encoding(); mb_internal_encoding(FPDF_UNICODE_ENCODING); $this->UniWrite($h, $txt, $link); mb_internal_encoding($oEnc); } else { parent::Write($h, $txt, $link); } }