'Method to create a table that will be inserted into the document
@param resource: A S3Resource object
@param list_Fields: A list of field names
@param report_groupby: A field name that is to be used as a sub-group
All the records that share the same report_groupby value will
be clustered together
@param report_hide_comments: Any comment field will be hidden
This uses the class S3PDFTable to build and properly format the table.
The table is then built and stored in the document flow ready for
generating the pdf.
If the table is too wide for the page then it will automatically
adjust the margin, font or page orientation. If it is still too
wide then the table will be split across multiple pages.'

def addTable(self, resource=None, raw_data=None, list_fields=None, report_groupby=None, report_hide_comments=False):

    table = S3PDFTable(document=self, resource=resource, raw_data=raw_data, list_fields=list_fields, groupby=report_groupby, hide_comments=report_hide_comments)
    result = table.build()
    if (result != None):
        self.content += result
