Report PDF download error

Describe your problem here
When I had version 5.0.0, I could download reports in PDF. This was very convenient.
I now have 7.0.0. When I click “Report” on the Dashboard, and then click “Download PDF” The tab label goes from “Patient Report” to “Uknown” and I do not get my report in PDF. I think there is something that I have not activated in Globals. Can anyone give me a hint?
OpenEMR Version
I’m using OpenEMR version 7.0.0.
I’m using: Firefox.

Operating System
I’m using: Ubuntu

Did you search the forum for similar questions?

Did you check the logs?
Was there anything pertinent in them?
Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All

hi @docrovner , can you paste the tail of the apache2 log, /var/log/apache2/error.log, here after that happens please?

[Fri Apr 28 07:37:48.442199 2023] [php7:error] [pid 9105] [client] PHP Fatal error: Uncaught Mpdf\MpdfException: mbstring extension with mbregex support must be loaded in order to run mPDF. in /var/www/openemr/vendor/mpdf/mpdf/src/Mpdf.php:9678\nStack trace:\n#0 /var/www/openemr/vendor/mpdf/mpdf/src/Mpdf.php(1051): Mpdf\Mpdf->_dochecks()\n#1 /var/www/openemr/interface/patient_file/report/custom_report.php(76): Mpdf\Mpdf->__construct()\n#2 {main}\n thrown in /var/www/openemr/vendor/mpdf/mpdf/src/Mpdf.php on line 9678, referer:

Is php missing mbstring?

php -m | grep mbstring

If not found,
sudo apt install php-mbstring
sudo systemctl restart apache2

1 Like

Well. Thanks for the suggestions. Unfortunately, reloading MB-String did not help. hmmmmm.

hi @docrovner, is there a new error in the php log or the same?

Hi, I have the same problem using 7.0.2. Did any find the solution?


7.0.2 PATIENT REPORT PDF BUG FIX IN FILE - openemr/interface/patient_file/report/custom_report.php

On line 60 insert code below after; $config_mpdf = Config_Mpdf::getConfigMpdf();

$config_mpdf[‘margin_top’] = $config_mpdf[‘margin_top’] * 1.5;
$config_mpdf[‘margin_bottom’] = $config_mpdf[‘margin_bottom’] * 1.5;
$config_mpdf[‘margin_header’] = $GLOBALS[‘pdf_top_margin’];
$config_mpdf[‘margin_footer’] = $GLOBALS[‘pdf_bottom_margin’];