in reply to lines per page

Repeatedly passing the lines back and forth is really going to be inefficient. Best thing to do would be to use tell after you've read the lines and pass that in a hidden field. When you get a request with that field set, use seek to reposition and read the next group.