Home > Backend Development > PHP Tutorial > 在linux 下 pdflib 多语言有关问题

在linux 下 pdflib 多语言有关问题

WBOY
Release: 2016-06-13 13:50:03
Original
921 people have browsed it

在linux 下 pdflib 多语言问题
关键代码如下:

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
$path =  getcwd()."/src/fonts/newfont.TTF";
if(!PDF_set_parameter($p, "FontOutline", "myfont=$path"))
{
     PDEBUG("set parameter fontoutline fail", __FILE__, __LINE__);
}

[color=#FF0000]$fonthand = PDF_load_font($this->pdf, "myfont", "unicode", ""); //此行报错[/color]
if($fonthand == NULL)
{
     PDEBUG("failed to search for a font and prepare it for later use",__LINE__,__FILE__);
}

if(!pdf_setfont($p, $fonthand, $big))
{
    pdebug("设置字体失败",__line__,__file__);
    return false;
}


Copy after login


提示错误为:
Unicode and glyph id addressing not supported in PDFlib Lite'

到网上找了N久没答案,请高手指教

我用的pdflib 版本是 7.0.3


------解决方案--------------------
PDF_load_font 这个函数你定义了?

网页头部有没有调用这个函数所在的网页?!!!
------解决方案--------------------
pdflib lite不支持 unicode
------解决方案--------------------
学习
jf
------解决方案--------------------
探讨
引用:
引用:
pdflib lite不支持 unicode


谢谢!

请问在 pdflib lite下有其他办法自己添加字体吗?比如说越南语,thai……

用UTF-8试试
貌似只有UTF-8支持越南语

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template