vikrambalye / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Box property calculation requires containing block width #244

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.While trying to download a pdf
2.While Converting a html to pdf
3.

What is the expected output? What do you see instead?
PDF format as in the page or tables. But i get these errors

"
Fatal error: Uncaught exception 'DOMPDF_Exception' with message 'Box property 
calculation requires containing block width' in 
D:\wamp\www\CICU\sites\all\modules\print\dompdf\include\block_frame_reflower.cls
.php:199 Stack trace: #0 
D:\wamp\www\CICU\sites\all\modules\print\dompdf\include\block_frame_reflower.cls
.php(616): Block_Frame_Reflower->_calculate_restricted_width() #1 
D:\wamp\www\CICU\sites\all\modules\print\dompdf\include\frame_decorator.cls.php(
477): Block_Frame_Reflower->reflow(Object(Block_Frame_Decorator)) #2 
D:\wamp\www\CICU\sites\all\modules\print\dompdf\include\block_frame_reflower.cls
.php(706): Frame_Decorator->reflow(Object(Block_Frame_Decorator)) #3 
D:\wamp\www\CICU\sites\all\modules\print\dompdf\include\frame_decorator.cls.php(
477): Block_Frame_Reflower->reflow(Object(Block_Frame_Decorator)) #4 
D:\wamp\www\CICU\sites\all\modules\print\dompdf\include\block_frame_reflower.cls
.php(706): Frame_Decorator->reflow(Object(Block_Frame_Decorator)) #5 
D:\wamp\www\CICU\sites\all\modules\print\dompdf\include\frame_de in 
D:\wamp\www\CICU\sites\all\modules\print\dompdf\include\block_frame_reflower.cls
.php on line 199"

What version of the product are you using? On what operating system?
Version : 0.6.2 Beta
OS: Windows XP

Please provide any additional information below.
Merged the DOMPDF with the Drupal CMS

Original issue reported on code.google.com by *prasha...@medicuslocums.com on 10 Mar 2011 at 1:17

GoogleCodeExporter commented 9 years ago
Can you post an example HTML document we can test against?

Original comment by eclecticgeek on 10 Mar 2011 at 7:27

GoogleCodeExporter commented 9 years ago
Actually its not hard core Html, i have merged the dompdf to the Drupal CMS 
with the PRINT MODULE. 
I found a way to display the pdf ,i commented the code in 
block_frame_reflower.cls.php on line 199 and that did the magic but the pdf 
which i download is scrambled. Please check the attachment.

Original comment by *prasha...@medicuslocums.com on 11 Mar 2011 at 5:00

Attachments:

GoogleCodeExporter commented 9 years ago
I understand that the HTML is dynamically generated. Unfortunately, unless the 
bug is a corruption in the PDF format the PDF document doesn't really give us 
much of a hint as to what's going on.

In the 0.6.0 beta you can see what HTML document DOMPDF is processing using 
$dompdf->output_html(). If you can supply that or point us to the web page 
having problems we can take a closer look.

Original comment by eclecticgeek on 11 Mar 2011 at 5:11

GoogleCodeExporter commented 9 years ago
Had the same error. Problem was caused by css syntax error ( padding: 
!important; )

It's weird that I had the same code on 3 server and it only failed on one them.

Original comment by han...@mekaia.com on 18 Oct 2012 at 2:28

GoogleCodeExporter commented 9 years ago
Thank you for the post, @hannes. That definitely helps narrow down the issue.

Test case: 
http://eclecticgeek.com/dompdf/debug.php?identifier=3ae9d0040b8931ebf9f1ed27d7e9
a0b5

Original comment by eclecticgeek on 18 Oct 2012 at 4:58

GoogleCodeExporter commented 9 years ago
If it's any help. I was able to trigger the error by setting padding to a <td> 
Element with a wrong unit, I wrote 5xp. Looks like the get_containing_block 
functions chokes by not returning a width instead of ignoring the wrong unit or 
throwing an exception there.

Original comment by martin.r...@elovaris.at on 28 Feb 2013 at 2:42

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00