I'm trying to implement mpdf in CodeIgniter according to this article: http://codeigniter.com/wiki/mPDF_with_Codeigniter
I did it exactly the same way that is described there, but I got an error:
mPDF Error - cannot find TTF TrueType font file - mpdf/ttfonts/DejaVuSansCondensed.ttf
But the file is there. I tested this both on a webserver and on localhost. I changed chmod, neither did that have an effect.
What can I do about it?
I found out what was wrong.
As recommended in the CodeIgniter Wiki, I first had _MPDF_PATH in mpdf.php set to:
After I changed it to the absolute path, everything worked. The absolute path looks like this:
Instead of defining _MPDF_PATH like this...
Change path according to this one... this will work without any error if you placed mdpf directory in your libraries dir
I had the same problem. I've found my problem was the font. It was corrupted I've downloaded the font from internet and I've replaced it in the ttfonts folder. Everything worked!
Got same result after uploading library files (auto) converted to lowercase filenames by file manager.