Search code examples
opencartdompdf

DOMPDF not working on server


I have included the files properly as shown below,

require_once DIR_ROOT . '/vendor/dompdf/autoload.inc.php';
use Dompdf\Dompdf;

I'm creating object as mentioned in one of the tutorial

// instantiate and use the dompdf class
$dompdf = new Dompdf();
$dompdf->loadHtml('hello world');

This is working fine on my localhost. But It is failinng to create object $dompdf = new Dompdf(); on our server. I'm using opencart.


Solution

  • It worked after installing mb_string module on my server.