开发者

php: looking for pdf library which supports html->pdf [duplicate]

开发者 https://www.devze.com 2023-02-21 11:06 出处:网络
This question already has answers here: Closed 11 years ago开发者_开发问答. Possible Duplicate: Convert HTML + CSS to PDF with PHP?
This question already has answers here: Closed 11 years ago开发者_开发问答.

Possible Duplicate:

Convert HTML + CSS to PDF with PHP?

i'm looking for a pdf library which can render html into a pdf, with support for css + images. any suggesstions?

thanks


You should Google search first.

I used to use TCPDF and DOMPDF but they fail massively in many cases.

I've started using WKhtmltox tools a year or so ago, been adding to it ever since.

Since it relies on webkit, you get the benefit of some CSS 3 and HTML 5.

Keep in mind this uses a real browser (webkit) thus most quirks are addressed by major browsers like chrome and safari. The alternatives, on the other hand, have their own problems. I remember being bugged with TCPDF tables, for example.


tcPDF, domPDF and mPDF all provide an HTML to PDF that supports styling (and I believe images as well). These are all pure PHP libraries, with no external dependencies, or command line requirements. There may be others as well.

0

精彩评论

暂无评论...
验证码 换一张
取 消