from pylatex import Document, LongTable, MultiColumn


def genenerate_longtabu():
    geometry_options = {
        "margin": "2.54cm",
        "includeheadfoot": True
    }
    doc = Document(page_numbers=True, geometry_options=geometry_options)

    # Generate data table
    fmt = "X[r] X[r] X[r]"
    with doc.create(LongTable(fmt)) as data_table:
            data_table.add_hline()
            data_table.add_row(["header 1", "header 2", "header 3"])
            data_table.add_hline()
            data_table.end_table_header()
            data_table.add_hline()
            data_table.add_row((MultiColumn(3, align='r',
                                data='Continued on Next Page'),))
            data_table.add_hline()
            data_table.end_table_footer()
            data_table.add_hline()
            data_table.add_row((MultiColumn(3, align='r',
                                data='Not Continued on Next Page'),))
            data_table.add_hline()
            data_table.end_table_last_footer()
            row = ["Content1", "9", "Longer String"]
            for i in range(150):
                data_table.add_row(row)

    doc.generate_pdf("longtable",compiler="pdflatex", clean_tex=False)

genenerate_longtabu()
053afb4014e6aad698bea1ce80f49d8ad7837348
<mask token>

<mask token>


def genenerate_longtabu():
    geometry_options = {'margin': '2.54cm', 'includeheadfoot': True}
    doc = Document(page_numbers=True, geometry_options=geometry_options)
    fmt = 'X[r] X[r] X[r]'
    with doc.create(LongTable(fmt)) as data_table:
        data_table.add_hline()
        data_table.add_row(['header 1', 'header 2', 'header 3'])
        data_table.add_hline()
        data_table.end_table_header()
        data_table.add_hline()
        data_table.add_row((MultiColumn(3, align='r', data=
            'Continued on Next Page'),))
        data_table.add_hline()
        data_table.end_table_footer()
        data_table.add_hline()
        data_table.add_row((MultiColumn(3, align='r', data=
            'Not Continued on Next Page'),))
        data_table.add_hline()
        data_table.end_table_last_footer()
        row = ['Content1', '9', 'Longer String']
        for i in range(150):
            data_table.add_row(row)
    doc.generate_pdf('longtable', compiler='pdflatex', clean_tex=False)


<mask token>

<mask token>


def genenerate_longtabu():
    geometry_options = {'margin': '2.54cm', 'includeheadfoot': True}
    doc = Document(page_numbers=True, geometry_options=geometry_options)
    fmt = 'X[r] X[r] X[r]'
    with doc.create(LongTable(fmt)) as data_table:
        data_table.add_hline()
        data_table.add_row(['header 1', 'header 2', 'header 3'])
        data_table.add_hline()
        data_table.end_table_header()
        data_table.add_hline()
        data_table.add_row((MultiColumn(3, align='r', data=
            'Continued on Next Page'),))
        data_table.add_hline()
        data_table.end_table_footer()
        data_table.add_hline()
        data_table.add_row((MultiColumn(3, align='r', data=
            'Not Continued on Next Page'),))
        data_table.add_hline()
        data_table.end_table_last_footer()
        row = ['Content1', '9', 'Longer String']
        for i in range(150):
            data_table.add_row(row)
    doc.generate_pdf('longtable', compiler='pdflatex', clean_tex=False)


genenerate_longtabu()

from pylatex import Document, LongTable, MultiColumn


def genenerate_longtabu():
    geometry_options = {'margin': '2.54cm', 'includeheadfoot': True}
    doc = Document(page_numbers=True, geometry_options=geometry_options)
    fmt = 'X[r] X[r] X[r]'
    with doc.create(LongTable(fmt)) as data_table:
        data_table.add_hline()
        data_table.add_row(['header 1', 'header 2', 'header 3'])
        data_table.add_hline()
        data_table.end_table_header()
        data_table.add_hline()
        data_table.add_row((MultiColumn(3, align='r', data=
            'Continued on Next Page'),))
        data_table.add_hline()
        data_table.end_table_footer()
        data_table.add_hline()
        data_table.add_row((MultiColumn(3, align='r', data=
            'Not Continued on Next Page'),))
        data_table.add_hline()
        data_table.end_table_last_footer()
        row = ['Content1', '9', 'Longer String']
        for i in range(150):
            data_table.add_row(row)
    doc.generate_pdf('longtable', compiler='pdflatex', clean_tex=False)


genenerate_longtabu()

from pylatex import Document, LongTable, MultiColumn


def genenerate_longtabu():
    geometry_options = {
        "margin": "2.54cm",
        "includeheadfoot": True
    }
    doc = Document(page_numbers=True, geometry_options=geometry_options)

    # Generate data table
    fmt = "X[r] X[r] X[r]"
    with doc.create(LongTable(fmt)) as data_table:
            data_table.add_hline()
            data_table.add_row(["header 1", "header 2", "header 3"])
            data_table.add_hline()
            data_table.end_table_header()
            data_table.add_hline()
            data_table.add_row((MultiColumn(3, align='r',
                                data='Continued on Next Page'),))
            data_table.add_hline()
            data_table.end_table_footer()
            data_table.add_hline()
            data_table.add_row((MultiColumn(3, align='r',
                                data='Not Continued on Next Page'),))
            data_table.add_hline()
            data_table.end_table_last_footer()
            row = ["Content1", "9", "Longer String"]
            for i in range(150):
                data_table.add_row(row)

    doc.generate_pdf("longtable",compiler="pdflatex", clean_tex=False)

genenerate_longtabu()