Add Optical Character Recognition and Document Scanning Functionality to any Java-based OCR application.

  Download Free Trial
Aspose.OCR for Java

Aspose.OCR for Java


Aspose.OCR for Java is a stand-alone OCR API for Java applications while allowing the developers to perform optical character recognition on commonly used image types. It provides a simple set of classes to control character recognition for various language characters. Developers can easily read characters in multiple fonts, rotated images, whole images or parts of images.


Image to Text Java API Features



Read different characters from images


Support for common image formats


Scan any part of an image or as a whole


Scan rotated images


Read the text in multiple fonts


Support for common font styles


Get skew angle of images

Perform OCR On Image Selected Areas

Using the library, developers can extract text from image specific parts by specifying rectangles, fonts, and styles. Recognizing text in pixels from images specific areas is simple, with just a few lines of code.

Perform OCR on selected areas - Java

//Create API instance
AsposeOCR api = new AsposeOCR();
//Prepare rectangles with texts.
ArrayList rectArray = new ArrayList();
rectArray.add(new Rectangle(138, 352, 2033, 537));
rectArray.add(new Rectangle(147, 890, 2033, 1157));
String result = api.RecognizePage("srcImage.png", rectArray);
System.out.println("Result with rect: " + result);

Recognize Text in Different Fonts

Aspose.OCR for Java API supports Times New Roman, Arial,  Verdana, Courier New,  Tahoma and Calibri fonts in regular, italic and bold text styles as well as different language characters.

Easy to Calculate Skew Angle

Using the Java OCR library, calculating the image skew angle is fast and simple. Developers can use CalcSkewImage function by providing image path that returns the skew angle.

Calculate Skew Angle of the Image - Java

//Create api instance
AsposeOCR api = new AsposeOCR();
// Get skew
double angle = api.CalcSkewImage("sourceImage.png");
System.out.println("Skew text is:" + angle + " degrees.");

Support and Learning Resources


Aspose.OCR offers individual OCR APIs for other popular development environments as listed below: