M
M
Millerish2016-11-14 19:18:04
PHP
Millerish, 2016-11-14 19:18:04

Html2pdf: how to fix question marks?

Good evening!
I am using the html2pdf library. After transferring to another hosting, it displays question marks instead of text. Has anyone had this? How to fix?

$html2pdf = new HTML2PDF('P', 'A4', 'en', true, 'UTF-8');
$html2pdf->writeHTML($content, false);
$html2pdf->Output('KP.pdf');

4c002a92994e4f2b88a9d2f1aed76d74.PNG

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-11-14
@Millerish

Good evening.
You can fix it by setting the encoding on the server, in the files, the files themselves, the database, etc. etc.
If the server is apache2, then in .htaccess try adding the line
AddDefaultCharset UTF-8

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question