Java OCR SDK

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>3.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

import com.mindee;
import com.mindee.parsing;
import com.mindee.parsing.invoice;

// Configure client with an api key
MindeeClient mindeeClient = MindeeClientInit.create("<MINDEE API KEY>");

// load a document from a file (alternatively, as a base64 string
// or a byte array)
DocumentToParse documentToParse = mindeeClient.loadDocument(new File("/path/to/the/file.ext"));

// Parse the document (this calls the MINDEE Receipt API over https)
Document<InvoiceV4Inference> invoiceDocument = mindeeClient.parse(
InvoiceV4Inference.class,
documentToParse);
  
logger.info(invoiceDocument.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 Icon  Join our Slack