The following code in
# Read the text recognition output from the processor
for page in document.pages:
for form_field in page.form_fields:
field_name = get_text(form_field.field_name, document)
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:
paragraph_text = get_text(paragraph.layout, document)
print(f"Paragraph text:\n{paragraph_text}")
code intention, that matches the "Upload Test Document" functionality should be
for page in document.pages:
for form_field in page.form_fields:
field_name = get_text(form_field.field_name, document)
field_value = get_text(form_field.field_value, document)
print("Extracted key value pair:")
print(f"\t{field_name}, {field_value}")
for paragraph in page.paragraphs:
paragraph_text = get_text(paragraph.layout, document)
print(f"Paragraph text:\n{paragraph_text}")
Reference: #147
Reactions are currently unavailable
The following code in
# Read the text recognition output from the processor for page in document.pages: for form_field in page.form_fields: field_name = get_text(form_field.field_name, document) 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: paragraph_text = get_text(paragraph.layout, document) print(f"Paragraph text:\n{paragraph_text}")code intention, that matches the "Upload Test Document" functionality should be
for page in document.pages: for form_field in page.form_fields: field_name = get_text(form_field.field_name, document) field_value = get_text(form_field.field_value, document) print("Extracted key value pair:") print(f"\t{field_name}, {field_value}") for paragraph in page.paragraphs: paragraph_text = get_text(paragraph.layout, document) print(f"Paragraph text:\n{paragraph_text}")Reference: #147