Move code to set the document's bottom padding into a function
Remove bottom padding when printing

This extra padding was responsible for the appearance of an extra, empty
page when printing.
Prevent unordered lists and images from being split across multiple pages