Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fastest PDF generation in PHP?

I'm attempting to generate some reports dynamically, very simple HTML tables with borders.

I've tried TCPDF and it renders up to 400 rows just fine but anything more than that (about 20 pages) it can't handle it. DOMPDF can't even do that.

These reports can be thousands of rows.

Any idea on a faster library or a better plan of attack?

like image 563
Scott Avatar asked Nov 15 '10 20:11

Scott


3 Answers

Try php-wkhtml2x php extension. It uses popular web engine webkit(Chrome and Safari uses that)

like image 177
user1380819 Avatar answered Sep 22 '22 16:09

user1380819


I use the FPDF library, the output is fast and resource-efficient. Try it out... http://www.fpdf.org/

like image 37
Kieran Avatar answered Sep 20 '22 16:09

Kieran


I don't know if these methods are the fastest, but they can certainly handle more than 20 pages.

You could use latex in combination with php: http://www.linuxjournal.com/article/7870

or Zend_Service_LiveDocx_MailMerge http://www.phphatesme.com/blog/webentwicklung/pdf-erzeugung-mit-dem-zend-framework/

like image 31
chris Avatar answered Sep 23 '22 16:09

chris