Skip to content

How do you check the chars in each cell in a row in a table? #991

Answered by samkit-jain
fsmosca asked this question in Q&A
Discussion options

You must be logged in to vote

You can get the cells by

for table in page.find_tables(my_table_settings):
    for row in table.rows:
        for cell in row.cells:
            print(cell)  # This is the bounding box of the cell.
            cropped_cell = page.crop(cell)  # Now crop the page so that only the cell is there.
            # Do anything like cropped_cell.chars Treat cropped_cell as a page 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by samkit-jain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants