absailesh / dompdf

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

Missing TR results in invalid method call on text node #67

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. when I add html code to http://myserver/dompdf/www
2. and click submit
3. page ends with 

PHP Fatal error:  Call to undefined method DOMText::getAttribute() in
/srv/www/htdocs/intranet/dompdf/include/cellmap.cls.php on line 399,
referer: http://myserver/dompdf/www/examples.php

tested on latest alpha version

Original issue reported on code.google.com by svecp...@gmail.com on 10 Sep 2009 at 6:43

GoogleCodeExporter commented 9 years ago
Do you have some sample code?

Original comment by eclecticgeek on 10 Sep 2009 at 6:48

GoogleCodeExporter commented 9 years ago
yes, I have

Original comment by svecp...@gmail.com on 11 Sep 2009 at 10:40

Attachments:

GoogleCodeExporter commented 9 years ago
I've been getting this error too. 

Original comment by creepy...@gmail.com on 14 Sep 2009 at 7:46

Attachments:

GoogleCodeExporter commented 9 years ago
The problem is caused by table rows that are not contained within a <tr> 
element.
DOMPDF is unforgiving where HTML structure is concerned (unlike the web 
browsers).
Try validating your HTML to see where the problems are occurring.

This is still problematic, however. We'll have to decide how to address the 
issue.

There are also problems with the rendering that are outside the realm of this 
issue.
I'll post a new issue report to cover those.

Original comment by eclecticgeek on 15 Sep 2009 at 5:07

GoogleCodeExporter commented 9 years ago
I think, the DOM should be at least HTML4 valid before sending it to DOMPDF. I 
think we'll make a preprocessing tool to try to fix bad HTML code, but this 
will be wider than this issue.

Original comment by fabien.menager on 20 Oct 2010 at 8:48

GoogleCodeExporter commented 9 years ago
When this issue appear, it means that the HTML code is not completely valid, so 
that would be a good idea to try the HTML5 parser added in the SVN trunk which 
will be in the next beta coming soon.
http://code.google.com/p/dompdf/wiki/HTML5

Original comment by fabien.menager on 15 Jan 2012 at 11:08

GoogleCodeExporter commented 9 years ago

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