TCPDF cannot show Cyrillic

I am trying to output cyrillic in pdf format using TCPDF.

I tried using UTF-8, Windows-1251. I changed Unicode to FALSE and TRUE to check, but I only get? I tried by default with the font from the file, but with the same results, and I tried using setsubsettings, again, no result. What's wrong?

+4
source share
1 answer

Setting the font on freeserif did it for me - default font / helvetica: unreadable cyrillic characters; freeserif: readable Russian text.

// set default font subsetting mode $pdf->setFontSubsetting(true); // set font $pdf->SetFont('freeserif', '', 12); 

http://www.tcpdf.org/examples/example_008.phps

+13
source

Source: https://habr.com/ru/post/1394495/


All Articles