首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从DOMPDF获取错误"foo“

从DOMPDF获取错误"foo“
EN

Stack Overflow用户
提问于 2011-11-21 13:33:03
回答 1查看 1.2K关注 0票数 0

我有一个生成多个报告的脚本,每个报告都是使用DOMPDF转换成pdf的。报告的大小和内容类型各不相同,但通常混合了图像、表格和样式化文本。

在我试图转换的最新报告中,我得到了以下错误:

代码语言:javascript
复制
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}  

我通过验证器运行输入到DOMPDF的html,没有出现错误或警告。该报告确实包括几个表,但这些表都不会被强制拆分到多个页面上(最长的表大约是一页的三分之一)。除了无效的HTML之外,我不确定是什么导致了这一问题,搜索这个错误只表明这是一个潜在的原因。

有什么建议吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-06-18 03:07:34

我读了这篇文章,然后开始挖掘https://groups.google.com/forum/?fromgroups#!topic/dompdf/yXDoankutY8的错误。

检查您的CSS和HTML是否都有效。我使用Tidy函数修复了我的HTML,删除了CSS,一点一点地重新实现它。

在我的例子中,它是一个简单的CSS规则:

代码语言:javascript
复制
.views-row {
  display: block;
}
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8207689

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档