doulangpeng3933 2012-10-23 08:05
浏览 17
已采纳

用tcpdf写更快的pdfs

I generated pdfs with tcpdf using writeHTML. What I do, I write entirely html code and after that I generate pdfs with writeHTML.

My problem is that it's very slow. Generating 5 pages of data table (5 cols x 12 rows per page) takes about 10 seconds.

I followed almost all instructions from here: http://www.tcpdf.org/performances.php . I put

$pdf->setFontSubsetting(false) ;

Do you have other tips? Is it going to be more faster if I generate pdfs problematically?

  • 写回答

1条回答 默认 最新

  • duanlu1908 2012-10-23 08:55
    关注

    Generating HTML, letting TCPDF parse that HTML and rejiggle it into Postscript instructions, then write this Postscript is of course going to be way slower than directly writing the Postscript to begin with. Use the regular Ln, Cell, Write etc. methods to directly generate the PDF if you want maximum performance. Yes, it's somewhat more complicated than writing HTML, but that's because they're different things. And the slow part is translating between those different things.

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

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料