Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
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 c4aca1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/snippets/batch_process_documents_sample.py
Expand Up @@ -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:
Expand Down

0 comments on commit c4aca1b

Please sign in to comment.