Fixed issue when CalculatePages creates a null page when there is remaining height.
Fixed issue when CalculatePages creates a null page when there is remaining height.

AlexanderSWilliams/RectangleCompression