Home > front end >  How do I solve this error. Uncaught Error: Call to undefined function Dompdf\mb_internal_encoding()
How do I solve this error. Uncaught Error: Call to undefined function Dompdf\mb_internal_encoding()

Time:04-14

  • I have deployed an app to Heroku, everything is working well with the app but when I press the print button it is returning nothing, just a white page no pdf is generated.

  • In the localhost, everything is working well and the pdf is being generated.

  • From Heroku logs, I am getting this error: enter image description here

CodePudding user response:

your issue is with the PHP extensions on your hosting platform. For running this library for printing pdf you have to enable Enable MBString module in your cpanel or your hosting. The original question was answered in the library github issues

Here's the link to that

Happy Coding ;)

CodePudding user response:

mb_internal_encoding is a multibyte string function provided by the mbstring extension.

Heroku doesn't enable that extension by default, but it is available. You can enable it by adding it to your composer.json dependencies, e.g.

{
    "require": {
        "ext-mbstring": "*",
    }
}
  • Related