I am using the DOMPDF library to create an invoice in PDF. This document can be in French, Russian or English, but I am having trouble printing Russian characters.
F
if you will use DejaVu font you can see cyrillic characters
The DejaVu TrueType fonts have been pre-installed to give dompdf decent Unicode character coverage by default. To use the DejaVu fonts reference the font in your stylesheet, e.g. body { font-family: DejaVu Sans; } (for DejaVu Sans).
DOMPDF include DejaVu font be default
$html = "".
"А вот и кириллица".
"";
$dompdf = new \DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
echo file_put_contents('cyrillic.pdf', $dompdf->output());
You can also set change def for font by default in dompdf_config.inc.php
def("DOMPDF_DEFAULT_FONT", "DejaVu Sans");