Hi all,
I upgraded to PHP 7.2.5 from 7.1.1 and dompdf was running into errors not finding classes.
I downloaded dompdf latest version from git as well as in a release version but the same issue appeared when executing the code. I basically reduced everything to the example code given by dompdf for showing "Hello World" but it it does not work.
Full Error with "Hello World":
Fatal error: Uncaught Error: Class 'Dompdf\Frame\FrameTreeList' not found in /srv/www/htdocs/vhosts/app.com/dompdf/src/Frame/FrameTree.php:131 Stack trace: #0 /srv/www/htdocs/vhosts/app.com/dompdf/src/Css/Stylesheet.php(1040): Dompdf\Frame\FrameTree->get_frames() #1 /srv/www/htdocs/vhosts/app.com/dompdf/src/Dompdf.php(721): Dompdf\Css\Stylesheet->apply_styles(Object(Dompdf\Frame\FrameTree)) #2 /srv/www/htdocs/vhosts/app.com/order_print.php(104): Dompdf\Dompdf->render() #3 {main} thrown in /srv/www/htdocs/vhosts/app.com/dompdf/src/Frame/FrameTree.php on line 131
My current Code:
require_once 'dompdf/autoload.inc.php';
$html = 'Hello World';
//use Dompdf\Dompdf as Dompdf; // Already commented out as it was described inside a forum
$dompdf = new Dompdf\Dompdf(); // Changed due to a forum description
$dompdf->load_html($html);
$dompdf->set_paper("A4", 'portrait');
$dompdf->render();
$dompdf->stream("order.pdf", array("Attachment" => 0));
Former code with the guthub downlod has all require() included; rest was the same.
require_once 'dompdf/lib/html5lib/Parser.php';
require_once 'dompdf/lib/php-font-lib/src/FontLib/Autoloader.php';
require_once 'dompdf/lib/php-svg-lib/src/autoload.php';
require_once 'dompdf/src/Autoloader.php';
Dompdf\Autoloader::register();
Any idea what is going wrong here ?
Thanks
Torsten