Answer the question
In order to leave comments, you need to log in
How to set up mpdf?
Hello.
httpd server 2.4. PHP: 5.6.23. Site on 1C-Bitrix. Runs on UFT-8 (mbstring.func_overload 2).
Downloaded mpdf6. On the page I create a pdf:
$html = 'привет. 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();
Answer the question
In order to leave comments, you need to log in
in .htaccess encoding AddDefaultCharset UTF-8
And resave .php files in the same encoding
I did this:
For the folder in which mpdf is located, set mbstring.func_overload = 0. And Bitrix will still work with mbstring.func_overload = 2
Diversion
<Directory весь сайт>
php_admin_value mbstring.func_overload 2
php_admin_value mbstring.internal_encoding UTF-8
</Directory>
<Directory сайт/пусть до mpdf>
php_admin_value mbstring.func_overload 0
</Directory>
So is there a solution? I am also struggling with this problem. VDS from timeweb. I write php_admin_value mbstring.func_overload 0 to the apache config file for the mpdf folder. Phpinfo() returns 0 on the directory. But the pdf is never generated. Only there is to set 0 for the entire directory of the site. But Bitrix swears. I ask for help from those who generate pdf using mpdf60 on Bitrix..
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question