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.


Maybe a better way because scriptcase is since months!!! not able to update wkhtmltopdf to the working version 0.12.6.

Does anyone have a good manual to install/ configure TCPDF or MDF on the deployment server with scriptcase. after update wkhtmltopdf stopped working in deployment environment. but in developer environment works fine

You can load MPDF as external library into scriptcase and use it from there.

Doing so it is automatically deployed together with your project and you do not have to care about installing anything on the client / live server.
Obviously it is also working in the development system to test your applications.

We’re using mpdf in our development for years now, cause it does not need anything on server level and it offers about the same functionallity as wkhtmltopdf from the view point of a php developer.

Unfortunately I cannot offer you a formal manual for the integration. But take a look into external libraries in Scriptcase and drop a message if you’re running into problems :wink:

Gunter Eibl

thanks Gunter i will try it and let you know

Has anyone heard if scriptcase will move away from wkhtmltopdf? It appers the project has been archived and in read only.

It looks like they will no longer keep it updated.