jeszcze jeden błąd: PHP Fatal error: Uncaught Error: Call to a member function convertToMM() on null in /opt/lms/vendor/spipu/html2pdf/src/Html2Pdf.php:688\nStack trace:\n#0 /opt/lms/lib/html2pdf/LMSHTML2PDF.php(84): Spipu\Html2Pdf\Html2Pdf->setDefaultMargins()\n#1 /opt/lms/lib/common.php(904): LMSHTML2PDF->__construct()\n#2 /opt/lms/modules/documentview.php(203): html2pdf()\n#3 /opt/lms/index.php(492): include('/opt/lms/module...')\n#4 {main}\n thrown in /opt/lms/vendor/spipu/html2pdf/src/Html2Pdf.php on line 688, referer: http://192.168.1.2/?m=documentlist&init=1 Pozdrawiam
W dniu 21.12.2021 o 09:38, Tomasz Chiliński pisze:
W dniu 20.12.2021 18:20, marcinsm napisał(a):
dalej problem w logu apache: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Spipu\Html2Pdf\Parsing\Html::__construct() must be an instance of Spipu\Html2Pdf\Parsing\TextParser, string given, called in /opt/lms/lib/html2pdf/LMSHTML2PDF.php on line 76 and defined in /opt/lms/vendor/spipu/html2pdf/src/Parsing/Html.php:50\nStack trace:\n#0 /opt/lms/lib/html2pdf/LMSHTML2PDF.php(76): Spipu\Html2Pdf\Parsing\Html->__construct()\n#1 /opt/lms/lib/common.php(904): LMSHTML2PDF->__construct()\n#2 /opt/lms/modules/documentview.php(203): html2pdf()\n#3 /opt/lms/index.php(492): include('/opt/lms/module...')\n#4 {main}\n thrown in /opt/lms/vendor/spipu/html2pdf/src/Parsing/Html.php on line 50, referer: http://192.168.1.2/?m=documentlist&init=1
Kolejna poprawka:
https://github.com/chilek/lms/commit/503520262cd6bacf96614214b0296ce9b1830a0...
Już dawno przesiałem się na konwersję HTML do PDF poprzez Google Chrome dlatego zapomniałem o rozwiązaniu opartym o bibliotekę PHP HTML2PDF, ale z drugiej strony dobrze to przy okazji poprawić.