Fixing infinite length page problem

Bounding the page height to the smaller of the desired height and
the height suggested by the rendering system.
Merge pull request #89 from damiancarrillo/i88-infinite-length-page

Fixing infinite length page problem