I've Upgraded my PHP to v7.4.16 .. lots of php Errors in html2pdf
Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\tcpdf.php on line 16893
Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\tcpdf.php on line 16893
Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\tcpdf.php on line 16896
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\tcpdf.php on line 17778
Deprecated: Array and string offset access syntax with curly braces is deprecated in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\include\tcpdf_images.php on line 318
Warning: chr() expects parameter 1 to be int, string given in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\include\tcpdf_fonts.php on line 1671
Warning: chr() expects parameter 1 to be int, string given in C:\inetpub\wwwroot\tester\vendor\tecnickcom\tcpdf\include\tcpdf_fonts.php on line 1671
Same here, I'm using PHP 8.0
igual para mi, no se como pueda solucionar esto
@Mark-Bestwick The warning is obviously not triggered by spipu/html2pdf but from tecnickcom/tcpdf which is a dependency of this package.
Which version of tecnickcom/tcpdf are you currently using (composer show tecnickcom/tcpdf)?
Version 6.3 should fix the warnings.
You can also hack the files: . In simple_html_dom, find all the regex that contain “-“ and escape the character (“-“). Around lines 682 and 1363 . Find the arrays with indexes {1} and replace them by [1] (I remember 2 occurrences (I think in tcpdf main file) . In tcpdf/include/tcpdf_fonts line 1666, add a test that returns “” if $c is empty (static function unichr($c, $unicode=true) {if(empty($c) {return “”;}
you can also activate debugging and it will find the locations for you.
Sorry, simple_html_dom is not part of tcpdf. PS: I have checked TCPDF v6.3 and it does not solve the problems. >> hacking.