Java OCR SDK

Quick Start

Here's the TL;DR of getting started.

First, get an API Key

Then, add the following pom dependency:

<dependencies>
    ...
    <dependency>
      <artifactId>mindee-api-java</artifactId>
      <groupId>com.mindee.sdk</groupId>
      <version>${mindee.sdk.version}</version>
    </dependency>
</dependency>
<properties>
    ...
    <mindee.sdk.version>1.0.0</mindee.sdk.version>
</properties>

For other dependency management tools, please refer to the Maven Repository

The following code sample gives a quick overview of how to use this library

// Configure client with an api key
Client client = new Client("<your mindee api key>");
// load a document from a file (alternatively, as a base64 string
// or a byte array)
DocumentClient documentClient = client.loadDocument(new File("path/to/document/document.pdf"));
// Parse the document (this calls the MINDEE Receipt API over https)
ReceiptResponse receiptResponse = documentClient.parse(ReceiptResponse.class);
logger.info(receiptResponse.toString());

Complete details on the working of the library are available in the following guides:

You can view the source code on GitHub.

 

Questions?
Slack Logo IconSlack Logo Icon  Join our Slack


Did this page help you?