The java resource page contains different versions of the resource file. Latest version is Aspose.OCR for Java 2.4.0. Please do not confuse yourself with the file name. Resource file name has been changed. The latest version of resource file has name Aspose.OCR_for_Java_2.4.0.zip. We will reflect this change on the documentation page very soon.
I tried with this file (Aspose.OCR_for_Java_2.4.0.zip) and got the following error:
Exception in thread “main” class com.aspose.ocr.internal.cl: Resource file is not correct. —> class com.aspose.ocr.internal.cl: Can’t find “data.xml” file in resources. —> class com.aspose.ocr.internal.hw: java.lang.NullPointerException —> java.lang.NullPointerException
Also, where do I choose Portuguese??? I’m not getting this process at all.
This is to update you that if you want to perform OCR operation on a scanned image containing writing other than English, requires loading language specific resources. Language specific resources for .Net and Java are same. These resources can be downloaded from link Resources. Following is the sample Java code snippet:
String imagePath = "french_sample.jpg"; OcrEngine ocr = new OcrEngine();
ocr.setImage(ImageStream.fromFile(imagePath));
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.