HTML JPG OCR XML BMP
Aspose.OCR  for Java
XML

Aspose.Imaging for Java

processes scanned images or even smartphone photos in WBMP format and creates WBMP documents containing recognized text. To add it to your project, you just need to get Aspose.OCR

Aspose Maven Repository or specify Aspose Maven Repository configuration and install it within your Maven-based project by adding the following configurations to the pom.xml. For Graddle, Ivy, Sbt examples check out our repository .

Maven Dependency


 <dependency>
 <groupId>com.aspose</groupId>
 <artifactId>aspose-ocr</artifactId>
 <version>22.5</version>
 </dependency>

With Java OCR and just a few lines of code, you can create full-featured application that converts an WBMP image to XML document:

  • Create an instance of AsposeOcr class
  • Call AsposeOCR.RecognizePage method
  • Pass the WBMP file path as parameter
  • AsposeOCR.RecognizePage returns a String or file of XML type

System Requirements

Before running the example, make sure that Java 2 Platform, Standard Edition (J2SE) 6.0 (1.6) or later is installed on your system.

  • JDK 1.6 or higher is installed.


 //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);
  • WBMP What is WBMP File Format

    WBMP is a monochrome graphics file format optimized for mobile computing devices. WBMP images are monochrome (black & white) so that the image size is kept to a minimum. A black pixel is denoted by 0 and a white pixel is denoted by 1.

    Read More

    XML What is XML File Format

    XML stands for Extensible Markup Language that is similar to HTML but different in using tags for defining objects. The whole idea behind creation of XML file format was to store and transport data without being dependent on software or hardware tools. Its popularity is due to it being both human as well as machine readable. This enables it to create common data protocols in the form of objects to be stored and shared over network such as World Wide Web (WWW). The “X” in XML is for extensible which implies that the language can be extended to any number of symbols as per user requirements. It is for these features that many standard file formats make use of it such as Microsoft Open XML, LibreOffice OpenDocument, XHTML and SVG.

    Read More

    TXT (Text Document File)
    Text (Text Document File)
    DOC (Documents generated by Microsoft Word)
    DOCX (Microsoft Word documents)
    XLS (Microsoft Excel Binary File Format)
    XLSX (Microsoft Excel documents)
    PDF (Portable Document Format (PDF))
    Searchable PDF (Searchable Portable Network Graphics )
    XML (Extensible Markup Language)
    JSON (JavaScript Object Notation)