From 321d6fc4b0be37f7271749ddb8e0f137d2933ccd Mon Sep 17 00:00:00 2001 From: dgallegos Date: Tue, 25 May 2021 14:35:36 -0500 Subject: [PATCH] fix: Parsing pages, but should be paragraphs (#147) The code intends to be parsing paragraphs from a page, but was instead parsing pages from a document. --- batch_process_documents_sample.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/batch_process_documents_sample.py b/batch_process_documents_sample.py index a66ff4419025..882170934416 100644 --- a/batch_process_documents_sample.py +++ b/batch_process_documents_sample.py @@ -102,7 +102,7 @@ def batch_process_documents( field_value = get_text(form_field.field_value, document) print("Extracted key value pair:") print(f"\t{field_name}, {field_value}") - for paragraph in document.pages: + for paragraph in page.paragraphs: paragraph_text = get_text(paragraph.layout, document) print(f"Paragraph text:\n{paragraph_text}") else: