'Helper function to calculate the various sizes of the page'

def calc_body_size(self, header_flowable, footer_flowable):

    self._calc()
    self.height = self.pagesize[PDF_HEIGHT]
    self.width = self.pagesize[PDF_WIDTH]
    self.printable_width = (((self.width - self.leftMargin) - self.rightMargin) - self.insideMargin)
    self.printable_height = ((self.height - self.topMargin) - self.bottomMargin)
    header_size = self.get_flowable_size(header_flowable)
    footer_size = self.get_flowable_size(footer_flowable)
    self.header_height = header_size[PDF_HEIGHT]
    self.footer_height = footer_size[PDF_HEIGHT]
    self.body_height = ((self.printable_height - self.header_height) - self.footer_height)
