How to configure mpdf?

Hello.

The httpd server 2.4. PHP: 5.6.23. A site on 1C-Bitrix. Working on UFT-8 (mbstring.func_overload 2).
Downloaded mpdf6. On the page create pdf:

$html = 'Hello. hello. 123';
require_once $_SERVER['DOCUMENT_ROOT']."/libs/mpdf60/mpdf.php";

$mpdf = new mPDF('utf-8', 'A4', '10', 'Arial');
$mpdf->charset_in = 'utf-8';
$mpdf->WriteHTML($html);
$mpdf->Output();

The output is in the downed encoding (krakozyabry). Google found that mpdf should be mbstring.func_overload = 0 but you can't do that, because Beatrix is working on mbstring.func_overload = 2.
Help please solution.
July 2nd 19 at 18:16
4 answers
July 2nd 19 at 18:18
in .htaccess charset AddDefaultCharset UTF-8
And files .php in the same encoding resave
The site is already in UTF-8 - devin.Huels commented on July 2nd 19 at 18:21
July 2nd 19 at 18:20
Did
For the folder, which is mpdf, to set mbstring.func_overload = 0. And Beatrix will continue to work with mbstring.func_overload = 2
And as for httpd 2.4. and PHP 5.6.23 to register correctly? - devin.Huels commented on July 2nd 19 at 18:23
Support virtual hosts set up on different directories mbstring.func_overload - devin.Huels commented on July 2nd 19 at 18:26
: how it correctly to register? Tried does not work. phpinfo shows the same mbstring.func_overload 2. - Bell_Anders commented on July 2nd 19 at 18:29
: if phpinfo() is at the root or in a folder of bitrix, it will show 2, of course - devin.Huels commented on July 2nd 19 at 18:32
but that's not the root of course directory with mpdf - Kamron12 commented on July 2nd 19 at 18:35
July 2nd 19 at 18:22

<directory entire site> 
 php_admin_value mbstring.func_overload 2
 php_admin_value mbstring.internal_encoding UTF-8 
</directory> 

<directory website to let mpdf> 
 php_admin_value mbstring.func_overload 0
</directory>
Wrong Apache configuration: AH00526: Syntax error on line 2 of /var/www/vhosts/system/host/conf/vhost.conf: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration - devin.Huels commented on July 2nd 19 at 18:25
: memoryhigh.ru/invalid-command-php_admin_value - devin.Huels commented on July 2nd 19 at 18:28
: it should not .htaccess and host (config) Apache. - Bell_Anders commented on July 2nd 19 at 18:31
July 2nd 19 at 18:24
So is there a solution? Also struggling with this problem. VDS from timeweb. Prescribed in cofig Apache folder mpdf - php_admin_value mbstring.func_overload 0. Phpinfo() gives for 0 directory. But pdf not generated. The interpretation is set to 0, the whole directory of the website. But Beatrix swears. Asking for help from those who generate pdf for the funds mpdf60 in Bitrix..
: the decision proved tcpdf - devin.Huels commented on July 2nd 19 at 18:27

Find more questions by tags 1C-BitrixPHP