dongshanxun6479 2014-05-08 14:39
浏览 137

在PDFlib 9中嵌入字体问题

We have just upgraded from 7 to 9 and unfortunately the guy who was running this quit and I am now in charge of this update. I am not too familiar with PDFlib either. From what I see we need to embed fonts because it no longer does this automatically for us. Below is a helper and the call to set a font.

public function setFont($name,$font)
    {

        $this->p->set_parameter("FontOutline", $name."=".Zend_Registry::get('fontPath').$font); 
    }

From what I read you have to set the embed on the load_font() function. Yet I don't see that. Also below is the call we make on the document.

$helper->setFont('MinionPro-Regular','MinionPro-Regular.otf');

Not sure if this helps, but hopefully someone can point me in the right direction. Thanks for any help.

  • 写回答

1条回答 默认 最新

  • douju1997 2014-05-09 11:10
    关注

    for embedding a font, you should set the embedding option in the load_font() option list. The line above, just do a matching for a font name to a font file. This do not load a font.

    Please check your code for a line which

    $this->p->load_font($name, "winansi", "");
    

    There you have to add "embedding" to the option list. Unfamiliar with the PDFlib API, please check the PDFlib 9 API Reference for details, which is bundled to your PDFlib 9 package within the doc directory.

    see also the answer to your posting on the PDFlib mailing list: https://groups.yahoo.com/neo/groups/pdflib/conversations/messages/22126

    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?