PHP library to convert PDF
This time i will compare some way to convert pdf with php library. I've used dompdf, mpdf and tcpdf php library that combine with phpexcel library on code igniter framework. First you must download and copy pdf converter library to library folder, as you see the picture below:
Then you can change some code ,to try dompdf, mpdf and tcpdf like the picture below:
For complete source code, you can see here.
I make simple template with excel files that contains header and some columns like this:
result with mpdf library like the picture below:
with tcpdf library :
with dompdf library :
and i've compare too with online pdf converter like http://www.freepdfconvert.com/
and the last comparison with print to pdf ( Ms Excel ) :
As you can see, the perfect one is mpdf library, but less on columns precision, both tcpdf and dompdf cannot render calibri font from the source template file. Bad columns convertion on tcpdf library. dompdf can convert good precision columns. With overall result, i think mpdf is the winner this time. Ms Excel and online pdf converter are not included because both of them are not php library.