Skip to content
Permalink
Browse files
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.
  • Loading branch information
dgallegos committed May 25, 2021
1 parent 7e9abd7 commit c4aca1bc1c01b3e1fdcc644eaf8922552c6c99a7
Showing with 1 addition and 1 deletion.
  1. +1 −1 samples/snippets/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:

0 comments on commit c4aca1b

Please sign in to comment.