<?
$pdf = pdf_new();
pdf_open_file($pdf, "./test.pdf");
pdf_set_info($pdf, "Creator", iconv("BIG5","UTF-16","小企鹅"));
pdf_begin_page($pdf, 595, 842);
## BOOKMARK要用UTF-16的UNICODE哦
$Parent=pdf_add_bookmark($pdf, Iconv("BIG5","UTF-16","繁体中文"));
pdf_add_bookmark($pdf, Iconv("BIG5","UTF-16","字体一"),$Parent);
$font = PDF_findfont($pdf, "MHei-Medium", "ETen-B5-H", 0);
PDF_setfont($pdf, $font, 14);
pdf_show_xy($pdf, "海南搏浪岛浪搏南海", 50, 750);
pdf_end_page($pdf);
pdf_begin_page($pdf, 595, 842);
pdf_add_bookmark($pdf, Iconv("BIG5","UTF-16","字体一"),$Parent);
$font = PDF_findfont($pdf, "MSung-Light", "ETen-B5-H", 0);
PDF_setfont($pdf, $font, 14);
pdf_show_xy($pdf, "白沙明月夜月明沙白", 50, 750);
pdf_end_page($pdf);
pdf_begin_page($pdf, 595, 842);
$Parent=pdf_add_bookmark($pdf, Iconv("BIG5","UTF-16","简体中文"));
pdf_add_bookmark($pdf, Iconv("BIG5","UTF-16","字体一"),$Parent);
$font = PDF_findfont($pdf, "STSong-Light", "GBK-EUC-H", 0);
PDF_setfont($pdf, $font, 14);
pdf_show_xy($pdf, "奻漆赻懂厄厄懂赻漆奻", 50, 750);
pdf_show_xy($pdf, "笢刓甜菱豪豪菱甜刓笢", 50, 650);
pdf_end_page($pdf);
/*
中文 encoding 的部分
{ "GB-EUC-H", cc_simplified_chinese },
{ "GB-EUC-V", cc_simplified_chinese },
{ "GBpc-EUC-H", cc_simplified_chinese },
{ "GBpc-EUC-V", cc_simplified_chinese },
{ "GBK-EUC-H", cc_simplified_chinese },
{ "GBK-EUC-V", cc_simplified_chinese },
{ "UniGB-UCS2-H", cc_simplified_chinese },
{ "UniGB-UCS2-V", cc_simplified_chinese },
{ "B5pc-H", cc_traditional_chinese },
{ "B5pc-V", cc_traditional_chinese },
{ "ETen-B5-H", cc_traditional_chinese },
{ "ETen-B5-V", cc_traditional_chinese },
{ "ETenms-B5-H", cc_traditional_chinese },
{ "ETenms-B5-V", cc_traditional_chinese },
{ "CNS-EUC-H", cc_traditional_chinese },
{ "CNS-EUC-V", cc_traditional_chinese },
{ "UniCNS-UCS2-H", cc_traditional_chinese },
{ "UniCNS-UCS2-V", cc_traditional_chinese },
汉字型的部分
"MHei-Medium",
"MSung-Light",
"STSong-Light",
*/
pdf_close($pdf);
pdf_delete($pdf);
?>