S
S
Sergey2012-01-09 16:36:31
PHP
Sergey, 2012-01-09 16:36:31

MPDF, problem with Cyrillic, did anyone solve it?

The task was to convert html->pdf
I found an article on mpdf: habrahabr.ru/blogs/php/111979/
It seems nothing complicated, I do everything as described. Only a problem arises: the text does not want to be displayed at all (it is written in white on white, except that links appear underlined), moreover, if you press ctrl + a, it is highlighted. When copying and pasting into an empty text file, the text is also present (normally readable)
Has anyone encountered this?
PS I work in utf-8. English layout does not show either.
PPS If someone has a 100% working version, please send it somewhere.

Answer the question

In order to leave comments, you need to log in

7 answer(s)
S
Sergey, 2012-01-10
@pacahon

Thank you all for your replies, I'll take your advice. The problem turned out to be with php_value mbstring.func_overload. This time I was lucky, the php version is 5.2.6 and you can change this value through htaccess, I don’t know what to do with newer versions.

F
Fastto, 2012-01-09
@Fastto

Working with mPDF after trying literally everything, including console utilities.
No problem. UTF-8 - Czech, German, Russian characters, Latin - everything is in order.
Works 100%. We create complex documents. If it's still relevant - write in a personal, I will help in any way I can.

A
Andrey, 2012-01-09
@shinyweb

Try: http://pastebin.com/qvTdfsYR . It works for me with version 5.0 . True, now there seems to be a newer version for a long time (5.3) - I think it should also work in it.

B
BasilioCat, 2012-01-09
@BasilioCat

I highly recommend wkhtmltopdf. Works better than the acrobat itself;) There are NO PROBLEMS with utf-8, I personally checked it. Yes, and it would be strange to have problems with yutf in chrome or safari (wk = webkit). You most likely have problems with the font. Use TTF fonts from Windows (starting with XP), and something simpler, like Arial.
PS: It is not easy to assemble it from sorts, you will have to put a bunch of everything according to dependencies that you don’t really need on the server at all, but the site has partially static builds for Linux and freebsd with a minimum of dependencies

A
AlejandroNonemo, 2014-07-25
@AlejandroNonemo

Hello! Help me please.
I don't see any letters, only tags.
File and settings mpdf utf-8.
php_value mbstring.func_overload =0 doesn't help(

P
PomanoB, 2012-01-09
@PomanoB

I join, mPDF works fine, only very slowly on large volumes, and some Cyrillic letters are printed in squares when printed from Adobe Reader. There are no such problems with Foxit Reader. There are no
problems with printing with TCPDF, but I had to generate the fonts myself according to the manual

P
Paul Denisevich, 2012-01-09
@deniamnet

I recommend domPDF: pxd.me/dompdf/www/examples.php#samples
Great stuff.
Requires PHP5.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question