PHP 7.2.5 Uncaught Error: Class 'Dompdf\Frame\FrameTreeList' not found

1,097 views
Skip to first unread message

torsten...@tradeshift.com

unread,
Aug 29, 2018, 9:44:00 AM8/29/18
to dompdf
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 



BrianS

unread,
Sep 16, 2018, 10:06:54 PM9/16/18
to dompdf
Reply all
Reply to author
Forward
0 new messages