The usual code (from example_001, with a loop to raise page break)
for ($i=1 ; $i<=100 ; $i++) { $txt = "Dummy <b>$i</b>"; $pdf->writeHTMLCell(0, 0, '', '', $txt, 0, 1, 0, true, '', true); printf("+ %d\n", $pdf->getY()); }
Works as expected (GetY grow, and is reset after page break)
Below code, which should be equiv. to previous (using ->Ln() instead)
for ($i=1 ; $i<=100 ; $i++) { $txt = "Dummy <b>$i</b>"; $pdf->writeHTMLCell(0, 0, '', '', $txt, 0, 0, 0, true, '', true); $pdf->Ln(); printf("+ %d\n", $pdf->getY()); }
Doesn't work. GetY is never reset, so, on second page, all lines are displayed at the same place.
This is correct.
The $reseth parameters reset the lasth value at the beginning of the htmlblock, not at the end.
To reset the lasth you have to call resetLastH() before Ln()
This issue is not about "lasth", but about "Y"
It is a kind of known side effect.
lasth needs to be reset.
I will investigate anyway to see if there is something I can do about it.