How to Extract Items From Invoices Using Azure Form Recognizer

2022-01-10 AI-OCR

Table of Contents

In this article, we will talk about how to extract items from an invoice.

Extract items from Invoice

Create a free Azure account

You can reference [Create a free Azure account] section of another article.

[Create a free Azure account]
https://thats-it-code.com/azure/how-to-create-a-static-html-website-with-basic-authentication-on-azure-in-10-minutes/

Create a Free Trial subscription

You can reference [Create and deploy the sample static HTML website to Azure] section of another article.

[Create and deploy the sample static HTML website to Azure]
https://thats-it-code.com/azure/how-to-create-a-static-html-website-with-basic-authentication-on-azure-in-10-minutes/

Create congnitive service resource

You can reference [Setup Azure] section of another article.

[Setup Azure]
https://thats-it-code.com/azure/how-to-use-form-recognizer-to-extract-items-from-receipt/

Extract items from sample invoice

Open Form Recognizer Studio, and click Prebuilt models -> Invoices https://formrecognizer.appliedai.azure.com/

Extract items from Invoice

For the first time, the configuration dailog will show and Select subscription, resource group and cognitive service resource created in the above.

Extract items from Invoice

Extract items from Invoice

After finishing the configuration, the Invoice recognition workspace shows up.
As you can see, a preset sample invoice pdf is listed in the left side panel, click Analyze button, the recognized results will show in the right side panel.

Key-Value result Extract items from Invoice

JSON result
Extract items from Invoice

Sample code
This code sample shows Prebuilt Invoice operations with the Azure Form Recognizer client library.
Extract items from Invoice

Next, let’s upload our own invoice file.

Click + Add in the left top corner to select our own invoice file downloaded from Internet. Click Analyze button to recognize it.

Extract items from Invoice

In the result, there is a table for the items and amounts.

Extract items from Invoice

Conclusion

We use pre-built invoice OCR model to extract items, amount, bill information, customer information, etc.
This model is powerful and can extract items from all kinds of invoicse with different layouts.

In next article, we will create a local development environment and use python library to call Form Recognizer API to extract items from sample invoice files.

How to Extract Items of Invoice Using Form Recognizer API
https://thats-it-code.com/azure/how-to-extract-items-of-invoice-into-text-file-using-form-recognizer-api/

Subscribe and be the FIRST reader of our latest articles

* indicates required

Contact us