def _test_it_notices_when_there_are_no_text_columns():
    fh = open('fixture/2012.01.PosRpt.pdf.pdf','rb')
    pdfPage = pdftables.getPDFPage(fh, 4)
    ncols, column_bounds = pdftables.multiColumnDetect(pdfPage)
    assert_equals(0,ncols)
def _test_it_notices_when_there_is_one_column_of_text():

    fh = open('fixture/13_06_12_10_36_58_boletim_ingles_junho_2013.pdf','rb')
    pdfPage = pdftables.getPDFPage(fh, 4)
    ncols, column_bounds = pdftables.multiColumnDetect(pdfPage)
    assert_equals(1,ncols)
def _test_multicolumn_COPAMONTHLY_2col_limited_text():
    fh = open('fixture/COPAMONTHLYMay2013.pdf','rb')
    pdfPage = pdftables.getPDFPage(fh, 1)
    ncols, column_bounds = pdftables.multiColumnDetect(pdfPage)
    assert_equals(2,ncols)
def _test_multicolumn_m29_2col_spanning_table():
    fh = open('fixture/m29-JDent36s2-7.pdf','rb')
    pdfPage = pdftables.getPDFPage(fh, 4)
    ncols, column_bounds = pdftables.multiColumnDetect(pdfPage)
    assert_equals(2,ncols)
def _test_multicolumn_bo_page24_4col_spanning_table():
    fh = open('fixture/bo_page24.pdf','rb')
    pdfPage = pdftables.getPDFPage(fh, 1)
    ncols, column_bounds = pdftables.multiColumnDetect(pdfPage)
    assert_equals(4,ncols)