PDF generation from html pages [closed]

 ̄綄美尐妖づ 提交于 2019-12-08 05:22:52

问题


To generate pdf file from html page I have used libraries like MPDF , FPDF, DOMPDF etc.

In each pdf library I found following issues.

  • mpdf causes unnecessary page breaks
  • FPDF needs more writting. etc

When I used DOMPDF it worked fine but large table didn't expanded to next page and pdf broke without generating next pages.

Then I searched for another pdf library and I came to know about TCPDF.

SO I want to know what are the disadvantages of "TCPDF"?


回答1:


A great alternative for PDF generation is wkhtmltopdf. It has a smooth integration and the result is awesome. You will have to install the binary into your server, though. If you're on a VPS or dedicated, this will not be a problem.

There's a PHP lib for using it, you can find it here: https://github.com/KnpLabs/snappy

Also, there's a nice solution for the large table problem you have. Maybe it can help you with another lib too, take a look here: https://code.google.com/p/wkhtmltopdf/issues/detail?id=566



来源:https://stackoverflow.com/questions/18128812/pdf-generation-from-html-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!