Move the code which prints the header and footer so that it is the last thing to be drawn
Removed a cairo graphics call to draw a rectangle. Instead, we preserve the previous path to
use for the stroke AND fill.