I have improved the reference example and RichTextLayoutTracer so that it now works fine with multipage cells.
In fact, it would be possible to do so without RichTextLayoutTracer, using "EndTableCell" which contains the ending page of cell, but it would be too much hassle to store the state. So I have added this as parameter to TableCell.
Now what I do in improved reference example is that I trace first column cells. As header cells there have vertical span, the numbers are 1 less than before, but page breaked cells are now accounted correctly.