Jeckky / dompdf

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

table with display: inline breaks rendering process #438

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
$html = "<table><tr><td></td></tr><table>";

What is the expected output? What do you see instead?
A table,

A see this:
Fatal error: Call to a member function get_cellmap() on a non-object in 
/home/mugg/sub/t.profebox.com/script/dompdf/include/table_cell_frame_reflower.cl
s.php on line 31

What version of dompdf are you using? What version of PHP? On what
operating system?
0.6.0 Beta 3

Linux

PHP 5.3.2 ( I'm not sure about X.X.2 )

Please provide the HTML source code you want to convert, or any additional
information.

Original issue reported on code.google.com by jonasfon...@mugnetic.com on 8 Mar 2012 at 8:48

GoogleCodeExporter commented 8 years ago
My mistake:
$html = "<table><tr><td></td></tr></table>";

Original comment by jonasfon...@mugnetic.com on 8 Mar 2012 at 8:49

GoogleCodeExporter commented 8 years ago
I'm not seeing the same error on a linux system using PHP 5.3.5.

Original comment by eclecticgeek on 9 Mar 2012 at 12:16

GoogleCodeExporter commented 8 years ago
So, why appear me the menssage of get_cellmap  member undefined ?

Original comment by marianaa...@gmail.com on 9 Mar 2012 at 9:51

GoogleCodeExporter commented 8 years ago
See my attachment please.

Original comment by jonasfon...@mugnetic.com on 9 Mar 2012 at 10:11

GoogleCodeExporter commented 8 years ago
Hello again the problem i thinks is about the CSS:
The CSS selector '  h1' is not valid
The CSS selector ' div.pergunta ' is not valid
The CSS selector '        div.pergunta p' is not valid
The CSS selector '                div.wrapQuestions' is not valid

And i think is about the space between the " ' " and "div.pergunta", you agree ?

Original comment by jonasfon...@mugnetic.com on 9 Mar 2012 at 10:49

GoogleCodeExporter commented 8 years ago
I detected the problem is about my css, 

// This is wrong,
// And can't continue.
table {
 display: inline;
}

Original comment by jonasfon...@mugnetic.com on 9 Mar 2012 at 10:52

GoogleCodeExporter commented 8 years ago
Sorry the attachment contain some security issues

Original comment by jonasfon...@mugnetic.com on 9 Mar 2012 at 11:01

Attachments:

GoogleCodeExporter commented 8 years ago
The cellmap issue is usually due to a missing cell after a page break. I think 
it has also cropped up with zero-height cells in the past, but I'd have to 
confirm that. I can't say why you're encountering that error without seeing the 
HTML document.

I don't think the CSS selector errors should be a problem. DOMPDF should just 
drop them. On the other hand, those appear to be valid selectors so I'm not 
sure why dompdf is compaining. Again, seeing the HTML+CSS would help debug the 
issue.

Original comment by eclecticgeek on 9 Mar 2012 at 6:01

GoogleCodeExporter commented 8 years ago
Hello,

The HTML + CSS i can't drop down here sorry. But when i remove the selector
table {
display:inline;
}

And some white space in begin of selector, the erro disappear. 
I don't if this is an erro. :S

The Best,
Jonathan Fontes

Original comment by marianaa...@gmail.com on 9 Mar 2012 at 8:34

GoogleCodeExporter commented 8 years ago
display:inline is probably throwing dompdf as far as the document structure. 
You might try display: inline-table if you want the table to be displayed as 
part of a line.

I'm still not sure why white-space at the beginning of a selector would cause 
problems. Can you share a sample stylesheet?

Original comment by eclecticgeek on 9 Mar 2012 at 9:41

GoogleCodeExporter commented 8 years ago
I can confirm that setting a table to display:inline does break the rendering 
process. We may have to force inline-table styling, though the spec hopefully 
has guidance on this one.

Original comment by eclecticgeek on 9 Mar 2012 at 10:09

GoogleCodeExporter commented 8 years ago
Now i can't post css and html, later i will try. When i try the table inline, 
it was mistake when i write the code in my project, i lost many hours to give a 
solution about this. But the real problem was that.

Original comment by marianaa...@gmail.com on 9 Mar 2012 at 10:21

GoogleCodeExporter commented 8 years ago
I haven't found any guidelines or restrictions on how to handle a table when 
its display is set to other than table/inline-table. In fact, it appears 
Firefox (v11) treat the table as an inline element. Firefox must generate an 
anonymous table object around the table contents.

I think for the sanity of our users, at least until we have a chance to define 
a better solution, that we force either table or inline-table.

Original comment by eclecticgeek on 17 Mar 2012 at 1:59

GoogleCodeExporter commented 8 years ago
Hello, 

Only to say, that css rule:
table {
display:inline;
}

has an erro of ascii, beteween `table`and `{`have a caracter that mess it all 
css rule.

But, now i have another erro. 
I have this:
<div class="table nobr">
    <div class="top">
     dompdf will break this wrong!
    </div>
    <div class="bottom">
     this is line of bottom
    </div>
</div>

Css is:
nobr {
page-break-inside:avoid;
}

When dompdf need to break , the element look bad. Bottom div current with tab 
inside of page and give some much space between div.top and div.bottom... like 
300px...

Good Luck!

Jonathan

Original comment by jonasfon...@mugnetic.com on 6 Jul 2012 at 11:09

GoogleCodeExporter commented 8 years ago
In the CSS you are missing the class identifier, should be:
.nobr { page-break-inside:avoid; }

Original comment by eclecticgeek on 6 Jul 2012 at 5:27

GoogleCodeExporter commented 8 years ago
Sorry in my file css it's correct, wrong typing. The real problema isn't that ! 
The problem, now is about break block html into piece and give some much space 
in bottom of block html.!!!!

Original comment by jonasfon...@mugnetic.com on 6 Jul 2012 at 5:33

GoogleCodeExporter commented 8 years ago
Can you start a new issue for this problem? This issue is still relevant and 
something we need to fix. If there is another issue it should be addressed 
separately. Thanks.

Original comment by eclecticgeek on 7 Jul 2012 at 12:52

GoogleCodeExporter commented 8 years ago

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