Replace wkhtmltopdf to mpdf

mpdf is a php library to convert html to pdf, supports css and more.

Why? In my case, wkhtmltopdf doesn work on some servers, tried a console execution with no luck.

mpdf is multi-platform, entirely a php library, works very good, barcode support, etc etc

An a plus, is lightweight than wkhtmltopdf.

wkhtmltopdf folder 73mb
mpdf folder 32mb

And mpdf will work even as a replacement to tcpdf and no need of java libraries

The pdf stuff takes a huge % of the total amount of data to upload. It would be great if it could all be replaced by one package only which is multi platform. There are a lot of (old?) pdf executables and sources in the _lib.

I’ve tested mPdf in other developments and it works great, wkhtmltopdf has 73mb, tcpdf has 21mb in a total of 94mb!!! that could be replaced by 32mb of software!!

mPDF is a PHP class which generates PDF files from UTF-8 encoded HTML. It is based on FPDF and HTML2FPDF, with a number of enhancements.


I will discuss your suggeston with our team.

Bernhard Bernsmann

No change please …

Why do you ask for no change? They could reduce space size, upload, and even could remove some binaries that doesn work on every server. In my case I have my own server and couldn’t make wkhtmltopdf to work, even trying to execute it on the shell, but doesn’t works… Look at the forum and you’ll se many people that can’t make it work, mPDF works because is all php code…

I’ve read it differently. Don’t discuss it, just change it. But Rheinhart??

I find TCPDF easier than mPDF … thats all.

I can’t tell, don’t know. What I do know is that the total package for pdf inc. wkhtmltopdf is huge. So any more-lightweight option is welcome. I.e. every distro deploys apple stuff, even it it’s deployed on windows or linux…

Me as well. Also, I have about 24 reports that are using tcpdf that I really do not want to recode.