I installed the CakePDF plugin according to the documentation: https://github.com/FriendsOfCake/CakePdf
Now I want to create the first PDF file, and I got the following error:

This is my configuration in bootstrap.php:
Configure::write('CakePdf', [ 'engine' => 'CakePdf.Tcpdf', 'margin' => [ 'bottom' => 15, 'left' => 50, 'right' => 30, 'top' => 45 ], 'download' => true, 'encoding' => 'UTF-8' ]);
The only code I wrote is the following in the template:
$pdf = new TCPDF('P', 'mm', 'A4', true, 'UTF-8', false);
This is the code from line 68 in functions.php:
function h($text, $double = true, $charset = null) { if (is_string($text)) { //optimize for strings } elseif (is_array($text)) { $texts = []; foreach ($text as $k => $t) { $texts[$k] = h($t, $double, $charset); } return $texts; } elseif (is_object($text)) { if (method_exists($text, '__toString')) { $text = (string)$text; } else { $text = '(object)' . get_class($text); } } elseif (is_bool($text)) { return $text; } static $defaultCharset = false; if ($defaultCharset === false) { $defaultCharset = mb_internal_encoding(); if ($defaultCharset === null) { $defaultCharset = 'UTF-8'; } } if (is_string($double)) { $charset = $double; } return htmlspecialchars($text, ENT_QUOTES | ENT_SUBSTITUTE, ($charset) ? $charset : $defaultCharset, $double); }
I am completely confused and cannot find any solution. Does anyone have an idea?