'This will convert the S3PDFTABLE object to a format that can be
used to add to a S3PDF document object.
This is only used internally but could be used to generate a copy
of a previously generated table'

def presentation(self):

    content = []
    currentPage = 0
    totalPagesAcross = len(self.newColWidth)
    if ((self.autogrow == 'H') or (self.autogrow == 'B')):
        printable_width = self.pdf.printable_width
        newColWidth = []
        for cols in self.newColWidth:
            col_width = 0
            for col in cols:
                col_width += col
            if (col_width < printable_width):
                surplus = (printable_width - col_width)
                proportion = (surplus / col_width)
                newcols = []
                for col in cols:
                    newcols.append((col + (col * proportion)))
                newColWidth.append(newcols)
        self.newColWidth = newColWidth
    startRow = 0
    for page in self.pages:
        if (page == []):
            currentPage += 1
            continue
        colWidths = self.newColWidth[(currentPage % totalPagesAcross)]
        if ((self.autogrow == 'V') or (self.autogrow == 'B')):
            row_height = self.rowHeights[0][0]
            rows = len(page)
            if (self.body_height > (row_height * rows)):
                rowCnt = int((self.body_height / row_height))
                extra_rows = (rowCnt - rows)
                if extra_rows:
                    cells = len(colWidths)
                    row = ([''] * cells)
                    extra = ([row] * extra_rows)
                    page = (page + extra)
        endCol = (len(colWidths) - 1)
        rowCnt = len(page)
        self.style = self.tableStyle(startRow, rowCnt, endCol)
        (page, self.style) = self.pdf.addCellStyling(page, self.style)
        p = Table(page, repeatRows=1, style=self.style, hAlign='LEFT', colWidths=colWidths, emptyTableAction='indicate')
        content.append(p)
        if ((currentPage + 1) < len(self.pages)):
            content.append(PageBreak())
        currentPage += 1
        if ((currentPage % totalPagesAcross) == 0):
            startRow += (rowCnt - 1)
    return content
