Pdf generation

Hi!

So it's been few days i tried to include a html to pdf library. I tried mpdf and others, and each time i've got errors I can't understand.

In my autoloader i've got $loader->registerNamespaces(array()) for my classes. I tried to had a $loader->registerDirs() for non-namespace. I also tried registerClasses... but i can't achieve to have ma mpdf class ok!

Is anyone already worked with an html to pdf converter in Phalcon ?

Thanks a lot

Alex



34.3k

What is library used it ?



3.7k

I simply trying to include mpdf to my project. I'm working with namespace but mpdf doesn't. And i can't achieve to have it 100% working :/

Create your own Class Loader, or just include mpdf class(es) file(s) for every request.



3.4k

I really recommend using composer. There is package with mpdf available: https://packagist.org/packages/mpdf/mpdf Composer autoload will take care of loading all clases, just include you vendor autoload to you your application boostrap. It's always better to keep your externals manageable with tools like composer or bower. You can easily switch between versions, resolve conflicts etc.



3.7k

Hi, thanks for the trick. I'm gonna give a try with composer!



3.7k

And i confirm it's 100% working! Thanks for answers!