import boto3 from trp import Document # Document documentName = "employmentapp.png" # Amazon Textract client textract = boto3.client('textract') # Call Amazon Textract with open(documentName, "rb") as document: response = textract.analyze_document( Document={ 'Bytes': document.read(), }, FeatureTypes=["TABLES"]) #print(response) doc = Document(response) for page in doc.pages: # Print tables for table in page.tables: for r, row in enumerate(table.rows): for c, cell in enumerate(row.cells): print("Table[{}][{}] = {}".format(r, c, cell.text))