Optimize page arrangement in print

[Issue #4]