M
M
Maxim Timofeev2019-02-01 11:17:06
PHP
Maxim Timofeev, 2019-02-01 11:17:06

Why does mPDF break on lists?

I use https://mpdf.github.io library to convert html to pdf.
I look at the available tags in the docks: https://mpdf.github.io/html-support/html-tags.html
ol and ul are. But in reality, my mPDF dies in the presence of ol or ul. At what with li without ol or ul there are no problems.

error example
An Error occurred while handling another error:
MpdfException: WriteHTML() requires $html be an integer, float, string, boolean or an object with the __toString() magic method. in somepath\vendor\mpdf\mpdf\mpdf.php:15884
...
Previous exception:
yii\base\ErrorException: A non-numeric value encountered in 
somepath\vendor\mpdf\mpdf\Tag.php:1889


Who knows what's wrong? So far, I got out of the situation with a helper that forms a set of paragraphs from the list, but this is not very convenient. Is it possible to make lists work in mpdf?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wagoodoogoo, 2019-02-01
@wagoodooogoo

What does dying mean? If it stops working, then you need to turn on debug and look at errors, if it distorts the overall picture in pdf, then most likely it doesn’t, it means that it works like that and cannot be otherwise.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question