The gap on the first page is caused by margin.

With you may inspect actual document content edges. The margins could be suppressed by corresponding tag attributes or by CSS properties.

The minor differences on the subsequent pages depend on implicit page break position. PD4ML tries to shift the position to avoid text line from being split. That gives some minor fluctuations, I guess.