顯示廣告
隱藏 ✕
看板 Bookrice
作者 ciffel (ciffel)
標題 [PHP] FPDF chinese-unicode 使用標楷體
時間 2011年06月13日 Mon. PM 06:37:24


<?
require('chinese-unicode.php');

$pdf=new PDF_Unicode();

$pdf->Open();
$pdf->AddPage();

$pdf->AddUniCNShwFont('uni');
$pdf->SetFont('uni','',20);

$pdf->Write(10, "1234學生名字\n伃綉堃亘");
$pdf->Ln();
$pdf->MultiCell (120, 10, "服\n務\n單\n位");
$pdf->Cell (240, 10, "本文用UTF8做為中文字編碼, 在這裡還是呼叫同樣的FPDF函數");
$pdf->Ln();

$pdf->AddUniCNShwFont('uniKai','DFKaiShu-SB-Estd-BF');
$pdf->SetFont('uniKai','',20);
$pdf->Write(70, "標楷體");

$pdf->Output();

?>

ref: http://blog.xuite.net/mjordan.chen/blog/43248960

--
※ 作者: ciffel 時間: 2011-06-13 18:37:24
※ 看板: Bookrice 文章推薦值: 0 目前人氣: 0 累積人氣: 1991 
r)回覆 e)編輯 d)刪除 M)收藏 ^x)轉錄 同主題: =)首篇 [)上篇 ])下篇