aws-samples / aws-samples/amazon-textract-textractor

Enhancement: Allow json parser to also set the images by passing the original document

Open
#238 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
493
Forks
163
PR merge metrics
No merged PRs in 30d

Description

Current work around for pdf is the following:
```python
from pdf2image import convert_from_path
from textractor.entities.document import Document

# Loading the JSON response
document = Document.open("output.json")

# Loading the images and setting them on each page
images = convert_from_path('doc.pdf')
for page, image in zip(document.pages, images):
page.image = image
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.