I've never had success with printing like that from a browser. The thing that helped me most was using a different print css file which would help with the layout when printing.
The other thing I have done is run the finished HTML report programmatically through w3m (a text-mode browser which renders tables in text awesomely). If you do that, you can then count the lines and whatever, because it's just a text buffer.