Automatically extract data from structured documents such as Invoices, Receipts.
There are many situations where specific data needs to be extracted from a scanned receipt or say, a screenshot taken from a mobile phone. To be able to automatically extract chosen information from such documents can help build delightful user experiences. This prefab helps implement this extraction of data from any structured document. With the document as the input, the prefab uploads it to AWS Textract to extract data from it. This extracted data is available as key-value pair and developers can pick the data they are interested in.
How to use this prefab
Create AWS account and IAM user with policy
Generate and set
AWS_SECRET_ACCESS_KEY, and the
AWS_REGIONat prefab’s App Environment. (In your app’s
Settings > Config profile > EntityEXtraction (prefab) > App Environment)
Bind the “URL” and “Entities” (properties of prefab) on your page.
URL is the path of the document(Prefab v1.2 supports
.jpgformats) to download and process. You can bind URL property with FileUpload widget's java service variable as shown in the below screen.
Entities are labels from the document whose values have to be extracted. For example, in a W2 form
Employee’s social security numbercould be an entity.
That’s it. Now you can bind prefab’s output(JSON object - key-value pair) back to different widgets (text, list, table, or form). The below example shows how to bind each individual entity-value to a
Finally, you can upload the document and then click on the prefab
extract_info, It can fill values automatically in
Textwidgets as below.
v1.2won't support PDF document.