doumei9589 2013-08-30 17:12
浏览 128
已采纳

如何使用mPDF将php文件的输出转换为变量

I'm using mPDF library to provide pdf files.

Assume that I have a file named facture.php that contains :

  • an image in the header

  • a table in the body

  • an image in the footer of the file

And another file named convert_HTML2PDF.php that will provide the pdf output of the first file.

I would like to get the output of the facture file that is interpreted into a variable and output it as a pdf file without visualising in the browser.

How can I do that and use the output inside the convert_HTML2PDF.php?

  • 写回答

3条回答 默认 最新

  • duanjiao5543 2013-09-03 01:53
    关注
    $mpdf->Output('filename.pdf', 'F');
    

    will send the output to a file on your server instead of a browser.

    See: http://mpdf1.com/manual/index.php?tid=125 For more output variations.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 R语言卸载之后无法重装,显示电脑存在下载某些较大二进制文件行为,怎么办
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?
  • ¥15 关于#vue.js#的问题:修改用户信息功能图片无法回显,数据库中只存了一张图片(相关搜索:字符串)
  • ¥15 texstudio的问题,