in reply to Preserving layout in pdf to text or html to text conversion
It just occured to me... Do you really need to reconstruct the whole page in text mode? If I got you right, you only need to check whether some lines are one above another. You could try to check for such relation between lines from the CSS data with much less effort than in case of re-creating the whole document.