Anonymous - 2005-03-01

Logged In: YES
user_id=622896

Well said in that this is a *WORKAROUND*

The true way to support massively nested tables and solve
the style problems at the same time, is to construct a
DOCUMENT OBJECT MODEL (xml-like)

It doesn't have to be XML 1.0 compliant nor stuff like that.
Split html2fpdf in two:

a) The Parser
This constructs a tree model of the document. And each node
will have its getstyle() function which calls the parent /
etc. This will make sure that no style overflows (like a
SPAN tag inside td's)

b) The printer.
This just traverses the document tree and is nearly
identical to current html2fpdf . The difference is, you
don't have to recalculate margins / paddings, nor have to
deal with closing tags anymore. It's just nodes inside nodes.

I suggest the author to begin this conversion stage so we
can get rid of the style bugs.