Financial Document OCR Java

The Java OCR SDK supports the Financial document OCR API.

Using this sample below,
we are going to illustrate how to extract the data that we want using the OCR SDK.
sample

Quick Start

public class SimpleMindeeClient {
  public static void main(String[] args) throws IOException {
    // Init a new client
    MindeeClient client = new MindeeClient("my-api-key");

    // Load a file from disk and parse it
    LocalInputSource localInputSource = new LocalInputSource(
      new File("./a8e8cfa-a74eaa5-c8e283b-sample_invoice.jpeg")
    );
    PredictResponse<FinancialDocumentV1> document = mindeeClient.parse(
      FinancialDocumentV1.class, localInputSource
    );

    // Print a summary of the parsed data
    logger.info(document.getInference().getDocumentPrediction().toString());
  }
}

Output:

:Document type: INVOICE
:Category: miscellaneous
:Subcategory:
:Locale: en; en; USD;
:Date: 2019-02-11
:Due date: 2019-02-26
:Time:
:Number: INT-001
:Reference numbers: 2412/2019
:Supplier name: JOHN SMITH
:Supplier address: 4490 Oak Drive Albany, NY 12210
:Supplier company registrations:
:Supplier payment details:
:Customer name: JESSIE M HORNE
:Customer address: 2019 Redbud Drive New York, NY 10011
:Customer company registrations:
:Tip:
:Taxes: 9.75 5.00%
:Total taxes: 9.75
:Total net: 195.00
:Total amount: 204.75

:Line Items:
====================== ======== ========= ========== ================== ====================================
Code                   QTY      Price     Amount     Tax (Rate)         Description
====================== ======== ========= ========== ================== ====================================
                       1.00     100.00    100.00                        Front and rear brake cables
                       2.00     25.00     50.00                         New set of pedal arms
                       3.00     15.00     45.00                         Labon 3hrs
====================== ======== ========= ========== ================== ====================================

Questions?

Join our Slack