compile(group: 'com.aspose', name: 'aspose-ocr-cloud', version: '23.12.0')
<dependency org="com.aspose" name="aspose-ocr-cloud" rev="23.12.0">
 <artifact name="aspose-ocr-cloud" ext="jar"/>
libraryDependencies += "com.aspose" % "aspose-ocr-cloud" % "23.12.0"

Java SDK & REST API to perform OCR in the Cloud


Product Page | Documentation | Live Demo | Swagger UI | Code Samples | Blog | Free Support | Free Trial

Aspose.OCR Cloud SDK for Java helps you perform OCR on various image file formats (JPEG, PNG, GIF, BMP, TIFF) within your cloud-based Java Apps, without installing any 3rd party software. It is a wrapper around Aspose.OCR Cloud REST APIs.

OCR Cloud Processing Features

  • Extract and recognize text from images via OCR
  • Peform character recognition on whole or partial image
  • Specify your desired rectangular area for OCR
  • Detect text from the desired rectangular area
  • Support for font attributes
  • Built-in skew correction module to detect slightly rotated images
  • Detect text (OCR) in English, French, and German (Deutsch)
  • Return the OCR response in the XML or JSON formats.

OCR Cloud Storage Features

  • Upload, download, copy, move and delete files, including versions handling (if you are using Cloud storage that supports this feature - true by default).
  • Create, copy, move and delete folders.
  • Copy and move files and folders accross separate storages in scope of a single operation.
  • Check if certain file, folder or storage exists.

Supported OCR Input File Formats


Supported OCR Output File Formats



Building the API client library requires:

  1. Java 1.7+
  2. Maven


To use Aspose.OCR Cloud SDK for Java you need to register an account with Aspose Cloud and lookup/create Client ID and Client Secret at Cloud Dashboard. There is free quota available. For more details, see Aspose Cloud Pricing.


Install from Maven

Add Aspose Cloud repository to your application pom.xml

    <name>Aspose Cloud Repository</name>

Install from source

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project’s POM:



At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/aspose-ocr-cloud-21.6.0.jar
  • target/lib/*.jar


import com.aspose.ocr.api.*;

private static void setUpConfig() throws Exception {

public String RecognizeFromUrl(String url) {
    String urlToFile = "https://upload.wikimedia.org/wikipedia/commons/2/2f/Book_of_Abraham_FirstPage.png";
    OCRResponse ocrResponse = RecognizeFromUrl(urlToFile, Language.English);
    return ocrResponse.text;

static String RecognizeFromContent(File f) {
    File f = new File(Configuration.getTestSrcDir(), "de_1.jpg");
    OCRResponse ocrResponse = RecognizeFromContent(f, Language.German);
    return ocrResp.text;


All Aspose.OCR Cloud SDKs, helper scripts and templates are licensed under MIT License.

Authorization & Authentication

Authentication schemes defined for the API is as follows:



It’s recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Product Page | Documentation | Live Demo | Swagger UI | Code Samples | Blog | Free Support | Free Trial

VersionRelease Date
23.12.0December 21, 2023
23.11.0November 30, 2023
23.6.0July 2, 2023
22.12.0December 27, 2022
21.6.0June 4, 2021
20.7.0July 6, 2020
1.0.0May 12, 2020
1.0.1May 12, 2020
20.5.0May 11, 2020
18.8.0September 18, 2019