I am having a dynamically generated HTML layout which I would like to mimic in a PDF report, but I am having trouble with the columns specification. Assume that the HTML looks like this:
+------------------------------------------------------+
| |
| SECTION 1 |
| |
+------------------------+-----------------------------+
| | |
| SECTION 2 | SECTION 3 |
| | |
+------------------------+-----------------------------+
| |
| SECTION 4 |
| |
+---------------+-------------------+------------------+
| | | |
| SECTION 5 | SECTION 6 | SECTION 7 |
| | | |
+---------------+-------------------+------------------+
And the content of the resulting PDF should be arranged the same. Now, since I don't know the actual layout in advance, I am looping section by section and creating a column for every section. At this point, I am able to calculate the width of a column. The problem is, since everything is a column, everything is at the same row, and I would like to make a wrap, so the columns which add to 100% width take a separate row. Is there a way to implement this in makepdf, or should I take a different approach?