dqrnskni67375 2014-02-05 20:16
浏览 89
已采纳

MPDF在外部服务器上没有生成任何内容

I've generated a beautiful HTML invoice with MPDF, but when I placed it on the server it isn't showing anything.

The logs show the following for local (here the generation works):

http://pastebin.com/n3xJujBH

The logs show the following when generating on the server (here it shows an empty HTML page on generation, not PDF):

http://pastebin.com/HDeSPHse

The following code is used to generate the PDF in Codeigniter:

private function _gen_pdf($html,$paper='A4')
{
    $this->load->library('mpdf53/mpdf');

    $mpdf=new mPDF('utf-8',$paper);
    $mpdf->debug = true;
    $mpdf->WriteHTML($html);
    $mpdf->Output();
} 

The HTML created is following: http://pastebin.com/b3hFNbT8

Something to note is that, if I put only "test" in $html, it won't generate either.

Any ideas?

  • 写回答

1条回答 默认 最新

  • douxi3554 2014-02-12 07:25
    关注

    The answer for me was switching to DomPDF. I never got in functioning on the external parallels server and will probably never know why..

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作