Heim  >  Artikel  >  Backend-Entwicklung  >  在linux 下 pdflib 多语言有关问题

在linux 下 pdflib 多语言有关问题

WBOY
WBOYOriginal
2016-06-13 13:50:03854Durchsuche

在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;
}




提示错误为:
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支持越南语

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn