|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
大部分语言的基础,不是说c有多好,而是c相对起手容易学,让你认为这个是编程语言,中文 有人还为没法用php_pdf做中文的pdf懊恼吧..
PHP_PDF套件在这边抓取,记得从头编译哦。用现成的会有MARK。
http://www.pdflib.com/pdflib/index.html
这是php_pdf共同Iconv转UTF-16做的简略单纯制造中文PDF的典范。
此部分不包括排版。有空弟在写别的一个排版典范。
<?
$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, "f漆`懂厄厄懂`漆f", 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);
?>熟悉HTML/CSS/JS等网页基本元素,完成阶段可自行制作完整的网页,对元素属性达到熟悉程度 |
|