Reputation: 13853
I've got a script that produces several reports, each of which I've been converting to pdf using DOMPDF. The reports vary in size and type of content, but typically have a mix of images, tables, and stylized text.
On my latest report that I was trying to convert, I got the error below:
Exception information:
Message: foo
Stack trace:
#0 library/dompdf/include/table_row_frame_reflower.cls.php(83): Cellmap->get_frame_height(Object(Table_Row_Frame_Decorator))
#1 library/dompdf/include/frame_decorator.cls.php(477): Table_Row_Frame_Reflower->reflow(NULL)
#2 library/dompdf/include/table_frame_reflower.cls.php(481): Frame_Decorator->reflow()
#3 library/dompdf/include/frame_decorator.cls.php(477): Table_Frame_Reflower->reflow(Object(Block_Frame_Decorator))
#4 library/dompdf/include/block_frame_reflower.cls.php(706): Frame_Decorator->reflow(Object(Block_Frame_Decorator))
#5 library/dompdf/include/frame_decorator.cls.php(477): Block_Frame_Reflower->reflow(Object(Block_Frame_Decorator))
#6 library/dompdf/include/inline_frame_reflower.cls.php(96): Frame_Decorator->reflow(Object(Block_Frame_Decorator))
#7 library/dompdf/include/frame_decorator.cls.php(477): Inline_Frame_Reflower->reflow(Object(Block_Frame_Decorator))
#8 library/dompdf/include/block_frame_reflower.cls.php(706): Frame_Decorator->reflow(Object(Block_Frame_Decorator))
#9 library/dompdf/include/frame_decorator.cls.php(477): Block_Frame_Reflower->reflow(Object(Block_Frame_Decorator))
#10 library/dompdf/include/block_frame_reflower.cls.php(706): Frame_Decorator->reflow(Object(Block_Frame_Decorator))
#11 library/dompdf/include/frame_decorator.cls.php(477): Block_Frame_Reflower->reflow(Object(Block_Frame_Decorator))
#12 library/dompdf/include/block_frame_reflower.cls.php(706): Frame_Decorator->reflow(Object(Block_Frame_Decorator))
#13 library/dompdf/include/frame_decorator.cls.php(477): Block_Frame_Reflower->reflow(NULL)
#14 library/dompdf/include/page_frame_reflower.cls.php(169): Frame_Decorator->reflow()
#15 library/dompdf/include/frame_decorator.cls.php(477): Page_Frame_Reflower->reflow(NULL)
#16 library/dompdf/include/dompdf.cls.php(680): Frame_Decorator->reflow()
#17 application/controllers/NetworthController.php(332): DOMPDF->render()
#18 library/ZendFramework-1.11.0/ZendFramework-1.11.0/library/Zend/Controller/Action.php(513): NetworthController->reportAction()
#19 library/ZendFramework-1.11.0/ZendFramework-1.11.0/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('reportAction')
#20 library/ZendFramework-1.11.0/ZendFramework-1.11.0/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#21 library/ZendFramework-1.11.0/ZendFramework-1.11.0/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#22 library/ZendFramework-1.11.0/ZendFramework-1.11.0/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#23 index.php(150): Zend_Application->run()
#24 {main}
I ran the html being input to DOMPDF through a validator, and there were no errors or warnings. The report does include several tables, but none of the tables would be forced to split over multiple pages (the longest table is about a third of a page). Other than invalid HTML, I'm not sure what can cause this, and searching for this error has indicated only that as a potential cause.
Suggestions?
Upvotes: 0
Views: 1393
Reputation: 550
I read this post https://groups.google.com/forum/?fromgroups#!topic/dompdf/yXDoankutY8 and went digging for HTML errors.
Check that both your CSS and HTML validates. I used the Tidy functions to fix my HTML and removed my CSS, re-implementing it bit by bit.
In my case it was a simple CSS rule:
.views-row {
display: block;
}
Upvotes: 4